Lawmakers in Pakistan have elected Arif Alvi, a candidate from the ruling Tehrik-e Insaf party (PTI), as the country's new president, a process that is expected to strengthen the grip of the party.
Pakistan's presidency is a largely ceremonial post in which the head of state is indirectly elected by lawmakers from the National Assembly, the Senate, and the country's four provincial assemblies.
All of those legislative assemblies were due to vote for the next president on September 4.
Alvi was expected to easily win the election, which comes after national elections on July 25 and just two weeks after cricket star-turned-politician Imran Khan became prime minister.
Alvi, a longtime ally of Khan, faces little challenge from the two other candidates -- Chaudhry Aitzaz Ahsan from the opposition Pakistan Peoples Party and Maulana Fazlur Rehman, the leader of the opposition Jamiat Ulema-e Islam (F) party.
Rehman is the joint candidate of five opposition parties -- including the Pakistan Muslim League-Nawaz of former Prime Minister Nawaz Sharif, who has been jailed on corruption charges.
Alvi will replace Mamnoon Hussain. who is due to step down from the president's post on September 8 after completing his five-year term in office.
A 2010 constitutional amendment curtailed the powers of Pakistan's presidency, reducing it to a figurehead post.
Khan's PTI formed a government after a controversial victory in elections that were tainted by allegations of intervention by Pakistan's army, a key player in the country's politics.