ISLAMABAD, Pakistan — Pakistan’s ousted prime minister, Nawaz Sharif, sharply criticized the Supreme Court verdict that forced him to step down last week and said he was planning a big rally in his hometown, Lahore, to galvanize public support for his political party and his future.

“What can be a bigger joke with the nation, and with a prime minister of the country, than this?” Mr. Sharif said, referring to the court verdict, in his first news conference since his removal from office on July 28 after the court ruled that corruption allegations had disqualified him.

“It was not a verdict over corruption or kickbacks or embezzlement in the state funds,” said Mr. Sharif, who looked relaxed and confident as he spoke with journalists in Islamabad, Pakistan’s capital. “Had it been so, I would have been very ashamed.”

Mr. Sharif’s political party, the Pakistan Muslim League-Nawaz, elected one of his longtime loyalists as prime minister, Shahid Khaqan Abbasi, who is expected to lead the government until general elections scheduled for next year. The new cabinet, sworn in on Friday, included almost all the ministers who had served under Mr. Sharif.