Nepal's main opposition leader Sher Bahadur Deuba was sworn in as prime minister on Tuesday after the country's highest court ousted his predecessor following months of political turmoil.
K.P. Sharma Oli, who came into power in 2018, was removed as PM by the Supreme Court on Monday after it rejected his latest effort to dissolve the bicameral parliament.
The 69-year-old first tried to dissolve parliament in December, but that attempt was also overturned by the court.
"I, in the name of God, the country and people, pledge that I will be committed and honest to the nation and its people to fulfil my duty as prime minister," Deuba said as officials looked on.
Deuba, the head of the opposition Nepali Congress, had claimed to have the support of 149 members of the 275-seat lower house.
He is the third Nepali lawmaker to become prime minister of the country for the fifth time.
The 74-year-old leader has to win a vote of confidence in the lower house within a month to retain the prime ministership.
Political analyst Lok Raj Baral said Deuba might struggle to retain the required support among lawmakers.
"If he fails to win the majority of votes, he can call for fresh elections and still lead the government to hold the polls," Baral said.
The Oli government had come to power in 2018 with a two-thirds majority.
There was optimism that his strong mandate at the polls would end years of instability and short-lived governments exacerbated by a devastating earthquake in 2015.
Deuba was elected as Nepal's prime minister four times between 1995 and 2018, including during the brutal, decade-long Maoist insurgency.