Pakistan's two main opposition parties announced they would form a new government together after their victory in elections this week, but skirted the issue of whether they would push for the ouster of U.S.-backed President Pervez Musharraf.

The ruling party said Friday it doubted that the new alliance would be stable, calling it a "marriage of convenience."

The broad agreement between the two secular opposition groups, which fought bitterly for a decade before Musharraf seized power in a 1999 coup, marks an important step toward setting up a civilian administration to govern the Islamic nation after years of military rule.

Asif Ali Zardari, the widower of slain former premier Benazir Bhutto, and Nawaz Sharif, whose last government was ousted by Musharraf, made the announcement Thursday after meeting in Islamabad, days after defeating the ruling party in the parliamentary elections.

"We have agreed on a common agenda. We will work together to form a government together in the center and in the provinces," Sharif said at a joint news conference with Zardari. He added that a third smaller group, the Awami National Party, would join them.

"The future of democracy is within our grasp. We will strengthen the parliament, we will strengthen democracy, we will work together for Pakistan. We will make a stronger Pakistan," Zardari said.

Bhutto's Pakistan People's Party won 87 National Assembly seats in Monday's vote, and Sharif's Pakistan Muslim League-N won 67 out of 268 seats contested. The pro-Musharraf Pakistan Muslim League-Q won 40, with the rest going to smaller parties and independent candidates. Six results have yet to be announced.

The result exposed Musharraf's own lack of public support amid rising Islamic militancy and anger over his crackdown on the independent judiciary. It also raised questions about his survival as head of state. He recently resigned from the army, considerably diminishing his power.

While both parties rode a wave of anti-Musharraf sentiment, they still have to hammer out the details of how they will share power and resolve divergence in policy, from the future of Musharraf to the restoration of the judiciary.

"I don't think the parties of Nawaz Sharif and Benazir Bhutto have reached any final agreement about forming a government," Tariq Azim, a ruling party leader, said Friday. "And if they do, it would be a marriage of convenience."

Sharif has been far sterner in demanding Musharraf's ouster and in seeking the immediate restoration of the chief justice sacked by the president when he declared emergency rule late last year — just as the Supreme Court was to rule on the legality of Musharraf's October re-election as head of state.

In what appeared to be a face-saving formula, Sharif told reporters that he and Zardari had agreed in principle on restoration of the judges but would leave it to parliament to sort out the details.

Just a few hours earlier he had made an impassioned address to protesters at the barricades in front of the Islamabad house of the deposed chief justice, Iftikhar Mohammed Chaudhry, demanding his immediate release and his restoration to the Supreme Court, which is now stacked with Musharraf appointees.

The two party leaders did not make explicit whether they would push for Musharraf's ouster, but Sharif reiterated his desire for the U.S.-backed president to go.

"I think the nation today has given out its verdict, and that verdict is amply clear and it is from every nook and corner of Pakistan. He also understands that. The sooner he accepts the verdict, the better it is for him," Sharif said.

Musharraf, a key ally of Washington in its war on terror, has said he has no intention of resigning and intends to serve out his five-year term.

U.S. State Department spokesman Sean McCormack said Thursday that U.S. officials are telling opposition forces that moderates in the government should work together to fight extremists and move toward democracy.

White House press secretary Dana Perino said it was up to the "people to decide whether Musharraf retains his position."

Last year, the U.S. and Britain pushed for a rapprochement between Bhutto and Musharraf. The two held talks, paving the way for Bhutto's return from exile amid hopes they could form a pro-Western alliance and galvanize Pakistan's struggling campaign against the Taliban and al-Qaida.

The negotiations collapsed before Bhutto's assassination in a Dec. 27 suicide attack, but Zardari has yet to rule out working with the retired general.

One of the first tasks of the new government, expected to be installed by mid-March, will be determining how to fight Islamic extremists, who have expanded their reach beyond traditional northwestern regions bordering Afghanistan. The country has been hit by dozens of attacks blamed on Muslim militants in recent months that together have left hundreds dead.

Both opposition parties have mulled the idea of negotiating with militants rather then relying on military force, but they have not yet given a clear indication of what that might entail.