Lawmakers in Pakistan's lower house of parliament on Friday elected cricket star-turned-politician Imran Khan the country's new prime minister.

Khan, 65, received 176 votes, four more than needed for a simple majority in the 342-seat National Assembly. His rival Shahbaz Sharif of the Pakistan Muslim League (N) received 96 votes.

(Imran Khan acknowledges the crowd during his speech in Islamabad on July 21)

The Pakistan Peoples Party led by Bilawal Bhutto did not take part in the voting process and sat during the process in the hall.

PML-N parliamentarians chanted "unacceptable!" as speaker Asad Qaiser announced the election result.

PML-N and major opposition parties maintain that the July 25 general election was rigged and have pledged to protest against the new government inside and outside the parliament.

Khan's Pakistan Tehreek-e-Insaf is the single biggest party in the National Assembly, but has enlisted the support of the Pakistan Muslim League (Q), the Muttahida Qaumi Movement, the Grand Democratic Alliance and the Balochistan National Party to form a coalition government.