Asif Ali Zardari, co-chairman of the Pakistan People's Party (PPP) and widower of Benazir Bhutto, a former prime minister assassinated last year, has become the president of Pakistan.
Zardari took 481 votes out of 702, needing only 352 votes to guarantee him victory, according to provisional election results.
The PPP said Zardari's win was "a victory for democracy".
Sherry Rehman, the country's information minister, said: "It is an historic win. This man suffered jail for more than 11 years for the sake of democracy and today he is elected as the president of the country.
"It is a sign of the strengthening of democracy."
Votes from the four provincial assemblies are yet to be fully counted.
Zardari will succeed Pervez Musharraf, who resigned on August 18 under threat of impeachment.
Election contenders
Zardari beat his two main rivals, out of 32 candidates running, by a wide margin.
Saeed Zaman Siddiqui, a former supreme court chief justice, backed by Nawaz Sharif, a former prime minister and leader of the Pakistan Muslim League (Nawaz) party (PML-N), received 111 votes.
Mushahid Hussain, a senator for the Pakistan Muslim League (Quaid-e-Azam), the party which staunchly supported Musharraf, lagged behind with 24 votes, according to the commission.
In Sindh, Zardari's home province, the country's new president secured 62 of the 65 electoral votes, while Siddiqui and Hussain failed to get a single one, according to reports there.
Power and politics
Zardari will have to face a number of problems plaguing the country, including its economic malaise and increasing unrest in the north.
Talat Masood, a Pakistani political analyst, told Al Jazeera that it was "ironic that Zardari is going to be Pakistan's president".
"A wave of events have pushed him into this position from spouse to the president of Pakistan.
"There is no doubt he has a controversial past and his reputation is soiled. He will have to work very hard to improve his reputation."
Power play
Al Jazeera's Kamal Hyder in Islamabad said there was concern about whether or not the new president would now relinquish some of the powers held by Musharraf.
"Musharraf was the military chief and had supreme powers, but a civilian president will not likely have those powers," he said.
"One of the PML-N's leaders said that an act of parliament would be needed to remove the powers taken up by Musharraf. If they are not taken away, it will just be continuation of one-man rule.
Masood said that Pakistanis were skeptical about Zardari, but they want the democratic process to move forward and that "this selection is part of that process".
"The only thing is whether he will do good for Pakistan with this power or not," he said.
PHOTO CAPTION
Pakistan People's Party (PPP) co-chairman Asif Ali Zardari, seen here in June 2008.
Al-Jazeera