ISLAMABAD, Pakistan — Former Prime Minister Nawaz Sharif pulled his party from the Cabinet on Monday, raising doubts over the new government's stability and Pakistan's transition to democracy after eight years of military rule.

The ruling coalition that came to power after February elections — dealing a crushing defeat to allies of President Pervez Musharraf — could now flounder. Its two key partners cannot agree over how to restore senior judges removed by the former military strongman late last year.

Sharif said his group would still support the government led by the party of Asif Ali Zardari on an "issue by issue" basis, but also indicated he would join protests by lawyers lobbying for the restoration of the judges — which risks intensifying the standoff between the parties.

A permanent split in the coalition would boost Musharraf, a longtime ally in the U.S.-led war on terror, who has taken a back seat since the new civilian government took power in late March.

The failure of the new civilian administration could reinforce perceptions that only the army is capable of running the volatile Islamic country.

Political analyst Hasan-Askari Rizvi said that unless the two parties could find a quick solution to the judges issue "they will drift in the opposite direction."

"That could be the beginning of instability in Pakistan and a major setback for the prospects of democracy in Pakistan," he said.

Sharif said ministers from his party would meet with Prime Minister Yousuf Raza Gilani on Tuesday and hand in their resignations. He said he was "very pained" at the decision.

"We will sit together ... We are not going to sit on the opposition benches for the time being," Sharif told a news conference. "We will not take any step which will benefit Musharraf's dictatorship."

Separately, the 53-nation Commonwealth comprised mainly of Britain and its former colonies cited Pakistan's progress in restoring democracy in lifting the country's suspension from the group, imposed after Musharraf's imposition of emergency rule in November.

The wrangling within the coalition over the judges is an unwelcome diversion for a government facing myriad problems, including Islamic militancy — which claimed the life of Zardari's wife Benazir Bhutto in December — and a worsening economy.

Zardari and Sharif announced an agreement on reinstating the dozens of judges that were axed by Musharraf to forestall a Supreme Court ruling on his eligibility for office. But they have since disagreed on the mechanics, and weekend negotiations in London — the latest in several rounds of talks — did not produce a deal.

Zardari's party said it still wanted to restore the judges but the parties needed resolve how to best do it "without affecting the present judges" — a reference to those appointed during Musharraf's emergency.

Spokesman Farhatullah Babar said it would not fill the Cabinet vacancies left by Sharif's party and would try to resolve the issue "amicably."