The Pakistan People's party will seek a national government that includes supporters of Nawaz Sharif, the husband of assassinated opposition leader Benazir Bhutto said today.

But Asif Zardari said the PPP was not interested in entering a coalition with President Pervez Musharraf's allies, who lost heavily in yesterday's parliamentary elections.

As Zardari held out the prospect of an alliance between the PPP and Sharif's Pakistan Muslim League-N party – the two big winners from the election - Sharif stuck to his uncompromising line on Musharraf.

Sharif, who was overthrown by Musharraf in 1999, said it was time for the president to quit after his ruling party suffered a crushing defeat in Pakistan's parliamentary elections.

The former prime minister told reporters that Musharraf had said he would quit when people told him to.

"And now the people have given their verdict," Sharif told reporters.

Musharraf's Pakistan Muslim League-Q party (PML-Q) conceded defeat after a paltry showing and said it was prepared to work in opposition.

Party chairman, Chaudhry Shujaat Hussain, told AP television news that "we accept the results with an open heart" and "will sit on opposition benches" in the new parliament.

The big winners were the Pakistan People's party of the assassinated opposition leader Benazir Bhutto, and Nawaz Sharif's Pakistan Muslim League-N.

But neither party won an outright majority and are expected to enter power-sharing talks. Sharif's party performed better than most polls had predicted, sweeping the board in the populous Punjab province, which elects about half of the parliament.

Nearly every major Musharraf lieutenant lost his seat and there were setbacks for the religious parties that have ruled the troubled North West Frontier province since 2002. "All the kings men, gone!" read a headline in the Daily Times.

The losers included Chaudhry Shujat Hussain, the president of Musharraf's party, the former foreign minister Khurshid Kasuri, and Sheikh Rashid, a close Musharraf confidante.

Pervez Elahi, a Musharraf stalwart with ambitions to become prime minister, won one of the three seats he was contesting under Pakistan's unusual electoral system.

The result was a stinging rebuke for Musharraf, whose popularity has plunged since he initiated a confrontation with the country's judiciary and lawyers last March, followed by emergency rule late last year.

The spokesman for Sharif's party, Saqiq ul-Farooq, told reporters that Musharraf "should go". But he said that if the restored justices validated the election of Musharraf to a new term last October, the opposition would accept the decision.

"We want to put Pakistan back on the track of democracy, constitution and rule of law, and the restoration of sacked judges is a must to achieve this goal," he said.

The question is whether, faced with overwhelming opposition, Musharraf, a former army commando, can bend to the new political reality and retain his position at the head of state.

Until now he has fought doggedly to maintain power, imposing a six-week emergency rule last November, jailing critical lawyers and judges, and imposing strict media controls.

With about 30 of the 272 seats undeclared, Musharraf's last hope is to prevent the opposition from gaining the two-thirds majority that would leave him vulnerable to impeachment in the new parliament.

"It's the moment of truth for the president," Abbas Nasir, the editor of the Dawn newspaper told Reuters. "There will be thoughts swirling in his mind, whether he can forge a working relationship with two parties whose leadership he kept out of the country."

Support from the US, Musharraf's most steadfast international ally, appears to be. Senior American military and intelligence officials have travelled to Islamabad in the past few months for talks with General Ashfaq Kayani, Musharraf's successor as head of the army.

A team of US senators that observed the vote described it as credible and legitimate, with the moderate majority expressing a desire for change.

"The will of the moderate majority, and the vast majority of the Pakistani people, who are moderate and democratic, is becoming a reality," said Joseph Biden, the head of the powerful Senate foreign relations committee.

On the eve of the polls, senator Joseph Biden, the head of the powerful Senate foreign relations committee who was observing voting in Lahore, warned that any evidence of large-scale rigging could trigger a cut in US assistance to Pakistan, which has amounted to over $10bn (£5bn) since 2001.

Many predicted the PML-Q, a mish-mash of political opportunists that has given Musharraf valuable political cover over the past five years, would not survive the rout.

"I don't think it's going to hold together. Nobody will want to stay with a party that has received such a big blow," said Hina Rabbani Khar, a former PML-Q minister who defected to Bhutto's party on the eve of the election.

Fears of widespread vote-rigging did not materialise although there were significant irregularities in many places across the country.

Any manipulation was not enough to halt the opposition landslide. The PPP won at least 80 seats, more than any other party but less than polls predicted.

In contrast, Sharif's Pakistan Muslim League-N picked up at least 64 seats thanks to his bald threats to unseat Musharraf. Sharif was not elected, however, having been barred from standing by criminal charges dating back to the coup that brought Musharraf to power in 1999.

Asif Zardari, the husband of Bhutto, travelled to Islamabad today, where the two leaders are expected to hold power-sharing talks.