Pakistan's lower house of parliament has chosen an ally of Imran Khan to be its next speaker, indicating he has enough support to become prime minister despite lingering allegations of election fraud over the July 25 ballot.
Asad Qaiser, a politician from Mr Khan's Tahreek-e-Insaf party, secured 176 votes, edging out joint opposition candidate Khusheed Shah, who got 146.
Mr Khan, a former cricket star and longtime politician, appears set to become prime minister when the National Assembly votes on Friday, and would be sworn in on Saturday.
His party won the most votes in the election, but had to forge alliances with independents to be able to form a majority coalition.
Opposition parties have held regular protests and refused to accept the outcome of the vote, accusing the military and intelligence agencies of intervening on Mr Khan's behalf.