Asif Ali Zardari (photo, from aljazeera.net), the widower of former prime minister Benazir Bhutto, became Pakistan’s new president, after winning a sweeping victory.
Severe economic problems and a rampant Islamist insurgency that are threatening the country’s stability are what awaits Pakistan’s new president.
At least 15 people were killed in an explosion near Peshawar city, during the voting.
Secret ballots elect the president, in the national and four provincial assemblies.
481 votes out of 702 have been won by Mr Zardari, which is far more than the 352 votes that would have guaranteed him victory, leaving his two rivals trailing far behind.
Asif Ali Zardari won all 65 votes in Sindh province, 56 out of 65 votes in North West Frontier Province (NWFP), and 59 out of 65 in Balochistan province.
But in Punjab province, which is the heartland of former prime minister Nawaz Sharif’s PML-N party, Mr Zardari only won 22 out of 65 seats.
Allegations of corruption
As the results became clear, the two daughters of Mr Zardari and Ms Bhutto hugged friends in delight, in the gallery of the national assembly, and the results have been called a “victory for democracy” by members of Mr Zardari’s Pakistan People’s Party (PPP).
The killing of his wife last December, pushed Mr Zardari into the centre of political power, as he became head of the PPP.
In recent months, Mr Zardari has shown skill by forging a large coalition and using it to peacefully unseat president Musharraf, said BBC’s Barbara Plett
But hounded for years by allegations of massive corruption, even though he has never been convicted, Mr Zardari is one of Pakistan’s most controversial politicians.
Last week, he has been accused of breaking key promises by former prime minister Nawaz Sharif, who took his PML-N party out of the governing coalition.
And at a time when urgent action is needed in Pakistan in order to improve the economy and deal with a raging Islamist insurgency, people fear that their country is facing a return to an old-style politics of confrontation.
Although he is seen as pro-Western and supportive of Washington’s self-declared war on terror, Mr Zardari will have to juggle the demands of the United States, Pakistan’s powerful army, and strong anti-American sentiment in the country.
That is what Pervez Musharraf tried to do, says BBC’s correspondent, adding that Pakistanis hope that Asif Ali Zardari will have more success, though they see little in his past to encourage them.
The fortunes of the Bhutto-Zardari family have fluctuated dramatically. While Gen Musharraf ruled the country, Mr Zardari spent years in prison, and his wife was assassinated at an election rally in December. Before that, her father, Zulfiqar Ali Bhutto, was hanged during the military dictatorship of President Ziaul Haq.
On Wednesday, as another reminder of the dangers of public life in Pakistan, gunmen attacked the motorcade of the prime minister. His car was hit by two bullets, although he was not in it at the time, say officials.
Saeeduz Zaman Siddiqui, a former judge who had the backing of Mr Sharif, and Mushahid Hussain Sayed, who was nominated by the PML-Q party that supported Mr Musharraf, were the other candidates for the presidency.
In the Islamabad parliament, members of the upper house, the Senate, were due to vote first, followed by the lower house, and Pakistan’s four provincial assemblies of Sindh, Punjab, Balochistan and the NWFP had a similar schedule.
Yet, in Peshawar, the NWFP capital, voting were delayed by a 5.6 magnitude earthquake that hit the area and neighbouring Afghanistan, prompting deputies to flee the assembly building.
With 65 votes, each of the provincial assemblies have an equal weighting. The three assemblies which do not have 65 deputies see the value of each deputy’s vote adjusted by a mathematical formula.
With only one round of voting, whoever has most of the 702 votes wins.