Nepal's former Supreme Court chief justice Sushila Karki has become the country's interim prime minister after deadly anti-corruption protests ousted the government.

The 73-year-old was sworn in during a brief ceremony, becoming the first woman to lead the impoverished Himalayan nation following an agreement with protest leaders.

More than 50 people were killed in clashes with riot police during this week's massive protests sparked by a ban on social media platforms.

Although the ban was lifted on Monday, the protests had swelled into a mass movement. Angry crowds set fire to parliament and government buildings in the capital Kathmandu, leading to Prime Minister KP Sharma Oli's resignation.

Earlier on Friday, President Ram Chandra Poudel's press adviser confirmed Karki would take the oath of office that evening. This agreement followed days of consultations involving legal experts and protest leaders.

Parliament was dissolved late on Friday, with general elections scheduled for March 5 next year. Karki is expected to appoint her cabinet shortly after taking office.

Renowned for her integrity, Karki's interim leadership has garnered support from student leaders of the Gen Z movement. However, her government will face challenges including restoring law and order and bringing those responsible for the violence to justice.

On Tuesday, Karki visited the protest site where 19 individuals died in clashes, showing her commitment to addressing the unrest. Despite coming from a politically influential family, Karki's past includes an impeachment incident during her tenure as chief justice.

The situation remains tense, with the army patrolling Kathmandu and restrictions still in place following the worst unrest in decades. The protests, which initially began over a social media ban, reflected greater discontent with the political elite.

The new prime minister has a daunting task ahead, aiming to unite a nation yearning for change in the wake of significant political upheaval.