Pakistani President Pervez Musharraf's opponents won a big election victory after voters rejected his former ruling party, raising questions about the future of the US ally who has ruled since 1999.

No party was expected to win a majority in the 342-seat National Assembly.

The opposition parties of assassinated former Prime Minister Benazir Bhutto and former Prime Minister Nawaz Sharif appeared to have won enough to command a majority, according to unofficial results. But there is no certainty that they will work together.

The pro-Musharraf Pakistan Muslim League was trailing a distant third, and the party's spokesman conceded defeat but kept open the possibility of joining a coalition.

"Obviously, the nation has spoken through the ballot. We couldn't convince them. They have rejected our policies and we have accepted their verdict," PML's Tariq Azim Khan told Reuters.

"For the best interest of the country, we're willing to cooperate and work with anybody. Otherwise, we're also ready to play our role in opposition."

According to unofficial results from 241 seats, Mrs Bhutto's Pakistan People's Party (PPP) had won 80 and Mr Sharif's Pakistan Muslim League (Nawaz) had 64.

The pro-Musharraf PML trailed with 37. Small parties and independents shared the others.

Mr Musharraf has said he would accept the results and work with whoever won to build democracy in a country that has alternated between civilian and army rule throughout its 60-year history.

Some analysts said the decisive factor in the PML's defeat was Mr Musharraf's unpopularity and resentment over inflation, food shortages and power cuts.

Groups of happy opposition supporters celebrated in the streets in cities across the country as results trickled out.

Pakistan's main stock market welcomed the peaceful polls and absence of rigging complaints, and shares rose more than three per cent. But dealers said the formation of a Parliament hostile to Mr Musharraf would make investors nervous.

Monday's vote was postponed from January 8 after Mrs Bhutto was assassinated in a suicide attack on December 27, which raised concern about the nuclear-armed country's stability.

As President, former army chief, Mr Musharraf did not contest the elections, aimed at completing a transition to civilian rule, but the outcome could seal his fate.

A hostile Parliament could try to remove Mr Musharraf, who took power as a general in a 1999 coup and emerged as a crucial US ally in a "war on terror" that most Pakistanis think is Washington's, not theirs.

Analysts said the implications for a President whose popularity slumped after he imposed emergency rule and purged the judiciary last year were ominous.

"It's the moment of truth for the President," said Abbas Nasir, editor of the Dawn newspaper. "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."

Mrs Bhutto spent eight years in self-exile to avoid corruption charges she denied. Mr Sharif was exiled a year after Mr Musharraf ousted him in 1999. Both returned late last year.

Mr Sharif was barred from the election because of past criminal convictions he says were politically motivated.

The election was relatively peaceful after a bloody campaign and opposition fears of rampant rigging by Mr Musharraf's supporters proved unfounded.

The PPP, led by Mrs Bhutto's widower, Asif Ali Zardari, had been expected to reap a sympathy vote, while Mr Sharif's party is doing surprisingly well despite a mixed record as Prime Minister, when he clashed with the judiciary.

His defiance of old foe Mr Musharraf and support for the judges he purged had paid off, analysts said.

A victory for Mr Sharif, who has repeatedly called for Mr Musharraf's removal, or the inclusion of his party in a coalition with the PPP would be disastrous for the President.

Fear appeared to have kept many people from the polls. An election watchdog group put turnout at 35 per cent. At least 20 people were killed in election violence, including, Mr Zardari said, 15 PPP activists.

Evolving scenarios for Pakistan's split vote

Shortly after 1 p.m. (0800 GMT) yesterday, results for 248 of 342 seats in the National Assembly were in, according to Geo News, an independent television channel.

It showed the Pakistan People's Party of assassinated former Prime Minister Benazir Bhutto leading with 85, the Pakistan Muslim League (Nawaz) of Nawaz Sharif, a former Prime Minister rigidly opposed to Mr Musharraf, on 64, and the pro-Musharraf Pakistan Muslim League (PML) a distant third with 37.

Possible scenarios, though the probabilities will alter as the count goes on;

• If, as seems likely, Mrs Bhutto's PPP emerges as the largest party in the assembly without getting a majority, it will be in the market for coalition partners.

• Mr Musharraf's camp will be downhearted, but probably not surprised by the scale of the PML's losses and will be hoping that the party musters enough seats to hold some leverage when the PPP assesses who it needs for partners.

• An alliance between the PPP and the party of Nawaz Sharif, the Prime Minister Mr Musharraf toppled in a coup in 1999, would probably lead to Mr Musharraf's swift exit.

The President could be impeached, or made to seek a pardon from Parliament for invoking emergency rule last November, or the government could try to reinstate the judges Mr Musharraf fired before they could annul his re-election last October.

The possibility of Mr Musharraf resigning if this scenario took shape cannot be discounted.

• But Mrs Bhutto's widower Asif Ali Zardari, who took over the helm after her assassination in December, might decide the PPP would be better off cohabiting with a clutch of smaller parties, possibly including the pro-Musharraf PML, rather than risk confrontation when it has power in its grasp.

• Shunning Mr Sharif is not without risk for Mr Zardari. He still has to consolidate his own position as the head of the PPP, and striking any compromises that allow Mr Musharraf to survive will be distasteful for many in the party and people who voted against the pro-Musharraf parties.

• If the PPP wins enough seats it could potentially form a coalition without either Mr Sharif's party or the PML. But that would leave it under-represented in Punjab, Pakistan's most populous and richest province and home to the establishment.

• Mr Zardari was jailed during Mr Sharif's premiership in the 1990s, and it was Mr Sharif who hounded Mrs Bhutto into exile in 1999, so trust will be an issue.

• Mr Zardari and Mr Sharif met last week. But their common fear then was that rigging by the government would rob them of victory, as it raised the prospects of confronting the army if their party activists went on the streets to protest.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.