Pakistan's former President Asif Ali Zardari won a second term on Saturday, supported by the ruling coalition in a vote by parliament and regional assemblies, the election presiding officer said.
The role of president is largely ceremonial in Pakistan but Zardari is known as a master of reconciliation and could help the governing coalition partners reach a consensus to steer the broken economy on a stabilisation path ahead of seeking a new IMF bailout.
As president, Zardari will also be the supreme commander of the country's armed forces, which play an oversized role in making or breaking governments.
Presiding officer Justice Amir Farooq announced the winner in a live TV broadcast.
Zardari got 411 votes, easily defeating the 181 votes cast for nationalist leader Mehmood Khan Achakzai, according to a statement from the parliament.
Achakzai was backed by jailed leader Imran Khan's party.
The president is elected by votes in the lower and upper house of the parliament and four provincial legislative assemblies.
Zardari is the widower of former Prime Minister Benazir Bhutto and gained political stature after his wife's assassination in a suicide bombing in December 2007, taking control of the PPP Party, in line with wishes expressed in her will.
He became president in 2008 and served until 2013, a period in which a U.S. special forces raid inside Pakistan found and killed Osama bin Laden in 2011.
Zardari's greatest achievement during his first term was seen as the building of a rare political consensus on adopting a new legal and political framework to decentralise power and curb the presidential powers wielded by former military leaders.
From the early 1990s to 2004, he spent 11 years in jail on graft charges, which were never proven in any court and that he and his party called military-backed political victimisation, a charge the army denies.

Trump adds seven countries to full travel ban list
Indian parliament votes to allow private firms in nuclear power sector
Doctors in England start five-day walkout during flu surge
Israeli settler kills 16-year-old Palestinian in West Bank, mayor says
Paris' Louvre reopens partially but staff vote to extend strike
Delhi restricts vehicles, office attendance in bid to curb pollution
India summons Bangladesh envoy over security concerns in Dhaka
Alleged Bondi gunman charged with 15 murders as funerals of victims begin
