Pakistan's parliament has selected Shehbaz Sharif as the country's new prime minister, after Imran Khan was ousted in a no-confidence vote in the early hours of Sunday.
The opposition coalition leader - who had worked to depose Khan - won the support of a majority in parliament.
Shehbaz Sharif will form a new government that can remain in place until elections are due in August 2023.
Khan, 69, was voted out after days of high political drama.
He had attempted to block a previous attempt to bring a no-confidence motion against him by dissolving parliament and calling for a snap election.
However, the country's Supreme Court upheld an opposition petition that his actions were unconstitutional and ordered the no-confidence vote to go ahead.
On Monday Sharif was elected in parliament unopposed and will be Pakistan's 23rd prime minister.
Rival candidate Shah Mahmood Qureshi had announced the Pakistan Tehreek-e-Insaf party led by Mr Khan was boycotting the parliamentary vote and staged a walkout. The former PM and most of his party's MPs resigned from their seats ahead of the vote.
Shehbaz Sharif submitted his candidacy for the top post on Sunday, before winning 174 votes in parliament the following day - two more than a simple majority of lawmakers.
In a speech after the vote, Sharif accused Imran Khan's outgoing government of mismanaging the economy and said putting it back on track would be a huge challenge for his new government.
However, Imran Khan, whose supporters protested across major cities after he was dismissed, is still blaming a "foreign conspiracy" for his removal as prime minister.
He has claimed that his rivals colluded with the US to remove him because of his foreign policy stance on Afghanistan, Russia and China. Washington has strongly denied the allegations and they have been ridiculed by his opponents.
But the former international cricketer's claims fed on anti-American sentiment held by many of his supporters.
How was Imran Khan ousted?
Khan's opponents saw an opportunity to strike after months of discontent over his management of the economy, and a breakdown in his relations with Pakistan's powerful military.
Sharif banded together with other opposition lawmakers to muster the numbers to vote Khan out.
On 3 April, they challenged Khan outright in parliament - launching a motion for a vote of no confidence in his leadership.
But the deputy speaker of the parliament - a political ally of Khan's - blocked the motion, claiming it was influenced by foreign powers. His government then swiftly dissolved parliament and called for a snap election.
The furious opposition immediately challenged the legality of government actions in the Supreme Court. After a four-day hearing, it ruled that Khan's government had acted illegally, in breach of the constitution.
Even then, Khan and his party tried to prevent the vote in parliament for hours - with officials quitting, lawmakers filibustering and other disruptions.
But eventually, in the early hours of Sunday, his opponents secured his removal, with 174 lawmakers voting against him in the 342-member house.
What do we know about Pakistan's new PM?
By Secunder Kermani, BBC Pakistan correspondent
Shehbaz Sharif, 70, served as chief minister of Punjab, Pakistan's most populous province, prior to Imran Khan coming to power in 2018. Sharif, who leads the Pakistan Muslim League Nawaz (PMLN), had a reputation for efficiency and being hardworking, and is credited with making significant infrastructure improvements.
Many ruefully contrasted him with his successor, Usman Buzdar, who was widely ridiculed as under-qualified and incompetent. Anger at Imran Khan's refusal to replace Mr Buzdar is one reason cited by numerous analysts for the emergence of a rift between Mr Khan and his previously close ally, the Pakistani military.
Shehbaz Sharif has always been in the shadow of his older brother, Nawaz Sharif, who served as PM on three occasions. Whereas Nawaz openly criticised the army following his removal from power, however, Shehbaz has favoured a reconciliation with the "establishment".
Like his brother, Shehbaz has also faced corruption allegations and has spent periods of time in jail during Mr Khan's tenure. He has not been convicted of an offence and maintains the allegations are politically motivated. Shehbaz Sharif's son, Hamza, is hoping to follow in his father's footsteps and become the next chief minister of Punjab.
Imran Khan's supporters regard the Sharif clan as part of the dynastic, "old Pakistan" that they want to relegate to history.
- BBC