The vote was fraught with significance, both for this crisis-weary country and for the West, which increasingly sees Pakistan as the keystone in its struggle against terrorism. In the short term, the result looks to have given Pakistan a much-needed measure of stability as jubilant voters feel that, finally, their voice has been heard.
In the longer term, the results could recast the nature of America's attempts to fight terrorists here. While Pakistan's new leadership will likely share America's desire to rein in extremists, experts say, they will want to distance themselves from the perception that they are Washington's lackey, which is the general view of Mr. Musharraf here.
"The coming government will have to give the message that, from now on, they are making decisions on their own," says Khalid Rahman, a political analyst at the Institute of Policy Studies in Islamabad.
Yet he and others note that the election was a repudiation of Pakistan's flirtation with radical Islam. At press time, with more than half of the results announced, Islamic parties had taken only three of 272 seats in the National Assembly, compared with 45 in 2002. In their place, voters chose secular parties, such as Benazir Bhutto's Pakistan People's Party (PPP).
"This is profoundly a vote for liberal democracy," says Shafqat Mahmood, a former senator, now a columnist for The News, a national newspaper.
The entire election was a remarkable reverse from expectations. Despite fears of widespread violence, no suicide bombers struck. Despite fears of substantial rigging – and some evidence of it on election day, observers say – the presence of the media and international pressure ensured that it did not play a decisive factor.
"Come election day, there were so many eyes watching," says Muddasir Rizvi, head of the Free and Fair Election Network, a nonprofit organization that deployed 60,000 observers. There were irregularities, he acknowledges, but "they were not as much as expected."
Indeed, several of Musharraf's most powerful parliamentary allies were struck down – to the amazement of voters, who had not believed that the government would allow such a result.
"The result is the blessing of God, otherwise I would not have believed it," says Mohammed Hafeez, a local resident relaxing near Lahore's famous Minar-e Pakistan, who says she stayed up until 4 a.m. watching the results on television.
For a country that has grown frustrated with Musharraf's government, the election brought welcome relief. Residents expressed unabashed joy at the demise of Musharraf's top ally, the Pakistan Muslim League-Quaid (PML-Q), which they blame for rampant inflation and the deterioration of law and order.
"I am very happy," says Mohammed Amjad Habib, smiling between handfuls of rice at a streetside Lahore restaurant. Echoing many others, he adds: The vote "was an expression of anger against PML-Q."
His hope, like that of most Pakistanis, is that Pakistan's two largest parties, the PPP and former Prime Minister Nawaz Sharif's faction of the Pakistan Muslim League (PML-N) will form a unity government. Projections of the still-unfinished count suggest these two parties could control two-thirds of the seats in parliament if they join with several other small allies.
Abida Hussain, a senior PPP official, expects that to happen. "It is safe to answer that PPP and PML-N … will form a coalition," she says. The formation of a new governing coalition is expected to be concluded in the next few days.
While it is difficult to predict how such an alliance might address US interests here, it seems certain that it would attempt to project a stronger image of independence than Musharraf has. Pakistanis overwhelmingly feel that America is bullying Pakistan into fighting a war against its own people in the tribal areas.
They would prefer a different approach, with more of an emphasis on negotiation. Analysts expect the new government to take that line. While the substance of the fight against terror will remain, "what will happen is that the nuances, and the public posturing will be different," says Mr. Mahmood, the columnist.
One of the only stumbling blocks to a grand alliance between the PPP and PML-N could be the issue of the more than 60 judges – including the chief justice of the Supreme Court, Iftikhar Chaudhry – whom Musharraf sacked during his emergency rule late last year. While all opposition parties condemned the move, only PML-N made restoration of the judges a primary campaign platform.
For her part, Ms. Hussain expects to see her PPP unite with PML-N in demanding restoration. If true, the situation would underscore the precariousness of Musharraf's situation.
In November, he resigned his post as Army chief under intense international and domestic pressure – losing his greatest source of support. Now, his allies in parliament have been dealt a comprehensive defeat, leaving him alone.
"Now very much depends on him," says Mr. Rahman, the political analyst. "How is he going to accept the attitude of the people?"
It is the moment that opposition parties have been waiting for since Mr. Sharif was overthrown by Musharraf in a bloodless coup in 1999. Prior to that, 10 years of civilian rule was a debacle beset by chronic infighting and corruption. After nearly a decade in exile, however, Bhutto's widower and head of the PPP, Asif Zardari, and Sharif, in particular, give the impression that they have matured as statesmen.
Says Hussain of the PPP: "What they have learned is that politicians need to tolerate each other."