Shehbaz Sharif will be Pakistan's next prime minister 

Shehbaz Sharif will be Pakistan's next prime minister after he won a parliamentary vote on Monday to elect a replacement for ousted premier Imran Khan.

Sharif won the support of 174 legislators out of the 342 member house, presiding speaker of the house Ayaz Sadiq announced.

He will now form a new government that can remain in place until August 2023, when general elections are due.

After the vote, Sharif vowed to tackle an economic malaise that has seen the rupee hit an all-time low and the central bank hike rates by its largest amount in decades last week.

"If we have to save the sinking boat, what we all need is hard work, and unity, unity and unity," he said in his maiden speech to parliament.

"We are beginning a new era of development today."

Just minutes before the vote, legislators from Khan's party resigned en masse from the lower house of parliament in protest at the expected formation of a government by his political foes.

"We are announcing we are all resigning," Shah Mahmood Qureshi, former foreign minister and vice president of Khan's party, told the assembly. 

The mass resignations will require fresh by-elections in well over 100 seats.

Imran Khan ouster

Khan was voted out of office on Sunday after a vote of 'no confidence' vote in Parliament.

Opposition parties had brought a motion against him last week.

In a bid to block the motion, however, Khan, former cricket player turned politician dissolved parliament and plunged the Country into a constitutional crisis.

But opposition leaders lodged a petition challenging the move before the country’s Supreme Court. The leaders argued Khan's move amounted to an “open coup against the country and the Constitution.”

The Supreme Court would deal a blow on Khan after it ruled in favour of opposition parties.

Chief justice of Pakistan, Umar Ata Bandial, ruled that Khan had acted unconstitutionally in dissolving parliament prior to a confidence vote.

On Sunday, he was ousted on allegations of economic mismanagement and mishandling of the country's foreign policy.