ISLAMABAD, Pakistan — It has been a difficult few days for the party that used to run Pakistan.

First, the party, the Pakistan Muslim League-Nawaz, known as the P.M.L.-N., came a distant second in the national election last Wednesday, winning about half as many parliamentary seats as the party headed by Imran Khan, a former cricket star.

Then Nawaz Sharif, the party’s figurehead and a former prime minister who was jailed by an anticorruption court this month, was rushed to a hospital on Sunday because of chest pains.

And on Monday, it appeared as if the party could lose another piece of its empire: the provincial assembly in Punjab, regarded as the silver medal of Pakistani politics.

Mr. Khan, whose campaign was said to have been backed by the military, is still trying to gather enough support to form a majority coalition in the national Parliament. But on Monday, the influential newspaper Dawn was already calling him the prime minister in waiting.