Pakistan - the balance of forces
The results of Pakistan's elections have been a setback for President Musharraf, whose party has been rejected in the polls and who now has to fend off demands for his resignation. So what is the current balance of political forces in Pakistan?
PRESIDENT PERVEZ MUSHARRAF
For years Pervez Musharraf was unequivocally the most powerful man in Pakistan but that no longer appears to be the case.
Appearing on state television the night before the vote, President Musharraf called for the victors to be humble and conciliatory.
Critics say there was a touch of hypocrisy over this plea, since the former general almost always chose to treat his opponents with anything but those qualities when he was at the height of his powers.
The president's Pakistan Muslim League-Quaid-i-Azam party (PML-Q) was all but wiped out in the polls. Now shorn of his uniform, the former military ruler is now in the weakest position he has been in for a decade.
He must now work with the two political parties whom he has always wanted to keep out of government.
There is the Pakistan People's Party (PPP), who have all but accused his regime of being involved in the assassination of their leader, Benazir Bhutto.
And then there is the Pakistan Muslim League-Nawaz (PML-N), headed by former Prime Minister Nawaz Sharif, whom Mr Musharraf overthrew in a coup and who is now back to haunt him.
The PPP want overwhelming control of the executive - that is, for the transfer of all powers to the prime minister. The party wants the president to be no more than a figurehead.
The PML-N wants nothing less than the removal of President Musharraf, by impeachment if necessary.
President Musharraf is unlikely to stand for either, and has indicated he will step down if he feels he is no longer needed.
Given the current mood, that would be the best option for the former military ruler.
After all, the president himself described the vote as "the mother of all elections", which nearly everyone agreed would serve as a referendum on his rule.
Given the poll results, the next move seems to be summarised by what is arguably Pakistan's most popular new slogan - "Go, Musharraf Go".
PAKISTAN PEOPLE'S PARTY
The PPP is on the one hand celebrating its success as the largest single party to emerge from the vote, while at the same time trying to rebuild itself after the assassination of its leader, Benazir Bhutto, in December.
The party seems to have come full circle from the time it stormed back into power after the death of former military ruler, Gen Zia ul-Haq , in 1988.
There was great expectation then, as there is now, that the party would drag the country back from the brink of chaos.
Only one thing was different. The PPP then was led by the charismatic and young Ms Bhutto.
While subsequent PPP governments did not quite live up to those expectations, many of Ms Bhutto's admirers say this was because of factors beyond her control.
Her return in October 2007 once again brought out all the charisma that overrode many failings.
Her assassination has been described as a Shakespearean ending to a life of triumph and tragedy. It has also left her party rudderless.
The PPP's victory, given the circumstances, has been a surprise to no-one.
Whether it can stay united and translate its current gains into a powerful and reforming political movement remains to be seen.
PAKISTAN MUSLIM LEAGUE - NAWAZ
The PML-N is led by Nawaz Sharif, the man toppled by Gen Musharraf in a coup in 1999.
Mr Sharif returned from years of exile last year. That has revitalised his party - which surprised many by emerging as the second largest in the elections.
It enjoys strong support from Pakistan's industrial and business classes.
The resurrection of Mr Sharif and the PML-N in the elections has been nothing short of miraculous.
In August 2007, when Mr Sharif was sent back into exile after attempting to return, many analysts believed that was the end of his political career.
But he returned soon after and since then has been working to get his party, ravaged by arrests and defections, back on its feet.
The PML-N is perhaps the only party which organised its campaigns around issues rather than sloganeering.
The two main points, other than the tackling inflation and improving employment, are the restoration of the judges sacked by President Musharraf when he imposed emergency rule in November and his removal as president.
Mr Sharif argues that his period of rule over the last 10 years has been unconstitutional.
On both agendas, Mr Sharif was uncompromising and promised to follow through with them if voted into power.
That dream may come true sooner than many imagined.
PAKISTAN MUSLIM LEAGUE - QUAID-E-AZAM
The PML-Q was formed mainly from defectors from the PML-N after the 1999 coup.
Since then it has been the main parliamentary face of President Musharraf's government, together with smaller provincial allies. It was the disputed victor of elections in 2002. But now it is in tatters.
Before the elections, they were full of confident bluster.
"We will win 100 seats," said Chaudhry Pervez Illahi, one of party's senior leaders.
But as results came in, over two-thirds of the party's high command lost their seats.
The remainder can at best hope to be minor partners in one of the provincial governments.
History looks set to remember PML-Q leaders as the latest in a long line of turncoats who have figured throughout Pakistan's turbulent political history, and who have been wiped out as soon as they were held to account in a popular vote.
NATIONALIST AND ETHNIC PARTIES
President Musharraf's tenure has been characterised by the suppression of nationalist parties and politicians.
With the exception of the MQM in the southern province of Sindh, President Musharraf chose either to sideline them or use strong-arm tactics against them.
In recent months the fire of nationalism, albeit with a religious tint, has started engulfing NWFP.
But the latest elections have brought the nationalists storming back into the political mainstream.
The ANP's revival in NWFP is a good example of this.
While the nationalists are not in a position to form the government, they are likely to play a critical role in its final shape.
They are also likely to push for greater provincial autonomy so that the provinces become a federation.
ISLAMIC PARTIES and OTHERS
The right wing MMA coalition of Islamic parties, which controlled the country's North West Frontier Province (NWFP), has been routed in the polls.
The winners belong to the province's old guard, the secular Pashtun Awami National Party (ANP) and the PPP.
Analysts predicted that the MMA would not do as well this time as in 2002.
The results though, may well reflect that the Islamists triumph then was a flash in the pan.
In 2002, the right wing political alliance won control over NWFP and a large number of national assembly seats.
But the province has since descended into chaos and anarchy, caused by extremists and Islamic militants.
Many locals blame MMA policies for this, arguing that they have only served to embolden the militants.
In addition, the region is the focus of international concern, after being named as a safe haven for al-Qaeda and Taleban militants.
Almost all the nationalist groups from the troubled province of Balochistan decided to boycott the elections.
ISLAMIC MILITANTS
The biggest concentration of militants are in the tribal areas bordering Afghanistan but they have been widening their area of activity.
Their main enemy is the army, but politicians, journalists, diplomats, social workers and government employees have all been targeted.
Newer militants are being drawn from all ethnic and social groups, rather than comprising mainly Pashtun tribesmen.
Intelligence and defence officials now admit privately that the militants may want nothing less than an independent Islamic state of their own.
But the strong public verdict in favour of relatively secular parties in NWFP is likely to have drastic consequences for such grandiose plans.
GEN ASHFAQ PERVEZ KAYANI - ARMY CHIEF
Gen Kayani was handpicked by President Musharraf to succeed him as army chief last year. He heads what is the most powerful institution in the country.
But the army has been badly demoralised by Islamic militants who have kidnapped and killed hundreds of soldiers in ambushes and suicide bombings.
Gen Kayani's response has been to get the army out of politics and back doing it primary job, ensuring security. Army personnel have been recalled from posts in civilian institutions. Senior officers have been banned from talking to politicians until after the elections.
Sources have told the BBC that Gen Kayani has moved to minimise interference in the polls by the intelligence services.
The key question now is how much support the army will give President Musharraf following his drubbing in the polls.
BBC NEWS | South Asia | Pakistan - the balance of forces