Cricketer-turned politician Imran Khan was elected as Pakistan's new prime minister today after he defeated veteran politician Shahbaz Sharif in a one-sided election in the National Assembly. The election for the top post became just a formality after the Pakistan Peoples Party led by Bilawal Bhutto Zardari with 54 seats abstained from voting following a rift over Sharif's candidature. Khan, 65, the chairman of the Pakistan Tehreek-e-Insaf (PTI), secured 176 votes while his only rival and the Pakistan Muslim League-Nawaz chief Sharif got 96 votes, National Assembly Speaker Asad Qaiser announced. After the announcement of the result, PML-N lawmakers chanted slogans against Khan and protested in the house. Khan will take the oath tomorrow as Pakistan's 22nd prime minister. A total of 172 votes in the 342-member lower house of Parliament are needed to form a government. The voting was held in open through division of members in different galleries designated for different candidates. The PPP lawmakers remained seated during the voting process. The Jamaat-i-Islami did not take part in the voting. In a last-ditch effort to pursue the PPP to vote for Sharif, senior PML-N leader and former speaker Ayaz Sadiq went to Bhutto's seat and tried to convince him to change his decision to abstain from voting, sources said. Even Sharif spoke to Bhutto to persuade him not to abstain. However, Bhutto excused himself from voting, they added. Sharif, the 66-year-old younger brother of jailed former prime minister Nawaz Sharif, served as the chief minister of the politically crucial Punjab province from 2013 to 2018. He became PML-N president after his elder brother was barred from holding the top party position and public posts. During the voting, Khan received support of smaller parties including Muttahida Quami Movement with seven seats, Balochistan Awami Party five, Balochistan National Party four, Pakistan Muslim League three, Grand Democratic Alliance three, Awami Muslim League and Jamori Watan Party one seat each. Earlier, PML-N lawmakers including Sharif arrived in the National Assembly wearing black armbands to protest against alleged "rigging" of the votes during the July 25 general elections. Sharif and Khan greeted each other and shook hands prior to the start of the session. Earlier this week, PTI's nominees for Speaker and Deputy Speaker secured 176 and 183 votes respectively. The PTI emerged as the single largest party with 116 seats in July 25 elections. Its number increased to 125 after nine independent members joined it and final tally reached 158 after it was allotted 28 out of 60 seats reserved for women and five out of 10 seats reserved for minorities. PTI spokesman Faisal Javed told the media yesterday that preparations are going on for the oath taking ceremony of Khan. Javed said that Khan will wear a black sherwani on the occasion. The ceremony will be held at the President House and President Mamnoon Hussain will administer the oath to the premier. The ceremony will be kept simple. Khan's government will be the third consecutive democratic government in Pakistan since 2008 when military ruler General Pervez Musharraf announced elections after serving as president from 2001 to 2008 following a bloodless coup in 1999. The PPP formed the government in 2008, followed by the PML-N led by jailed former prime minister Nawaz Sharif in 2013. Pakistan's powerful military has ruled the country through various coups for nearly half of the country's history since independence in 1947. Even during the civilian rule, the generals have wielded enormous power, setting the agenda for the country's foreign and security policies.