Updated

A key party in Pakistan's ruling coalition threatened Thursday to quit unless judges fired by former President Pervez Musharraf were quickly reinstated — dashing hopes his departure would end the nation's turmoil.

The two main parties in the civilian government — traditional rivals who were united primarily in their determination to oust Musharraf — also differ on who should succeed the one-time military ruler and whether he should face trial.

Already, the coalition's biggest bloc, the Pakistan People's Party, appears to be lining up smaller parties to keep control of parliament in case former Prime Minister Nawaz Sharif's party does pull out.

"The future of this coalition is linked to the restoration of judges," Sharif's spokesman Sadiqul Farooq told The Associated Press. "If the judges are not restored, we will prefer to sit on opposition benches."

Musharraf's resigned Monday to dodge the humiliation of impeachment following nearly nine years in power.

Pakistanis hope the fragile coalition partners can stop bickering and turn quickly to tackling the country's problems, like extremist violence in the volatile northwest and deepening economic woes.

But the two sides have plunged back into a struggle over how to restore dozens of Supreme Court judges Musharraf sacked late last year to avoid legal challenges to his rule — including former chief justice Iftikhar Mohammed Chaudhry.

The maneuver deepened his unpopularity, propelling his rivals to victory in parliamentary elections five months ago, and turned the judges into controversial political figures.

Sharif wants to restore the justices, who could help him if he decides to seek revenge against Musharraf, who ousted the former premier in a 1999 coup, jailed him and then banished him to exile in Saudi Arabia.

But Asif Ali Zardari, the leader of the Pakistan People's Party and widower of assassinated former premier Benazir Bhutto, is less enthusiastic, accusing Chaudhry of being too political.

Analysts say Zardari also may be worried the former chief justice would revive corruption cases against him or facilitate legal action against Musharraf — a destabilizing move sure to dismay the country's Western backers, especially the U.S.

The People's Party said Thursday it was committed to restoring the judges but that it had other priorities as well, including improving the lives of ordinary Pakistanis who are struggling with chronic food and fuel shortages.

"We hope the coalition will not break," Farzana Raja, the ruling party's spokeswoman told Pakistani Waqt news channel.

The standoff is the most serious threat yet to the civilian government.

Hedging its bets, the People's Party has established new allies in parliament, with the second largest opposition bloc, Muttahida Qaumi Movement, a strong Musharraf backer, signaling willingness this week to join forces.

The coalition also must seek agreement on a candidate for the presidency. The new leader must be elected by lawmakers by mid-September.

The People's Party insisted this week that, as the largest party in the coalition, it has the right to choose the new head of state, something unlikely to go over well with Sharif.

Though they have yet to name a candidate, party members were talking up a candidacy for Zardari, who comes from the well-off southern province of Sindh.

Sharif's party was arguing for a president from one of the smaller province — Baluchistan or North West Frontier — in order to strengthen Pakistan's strained federation.