Earlier on Friday, President Ram Chandra Poudel’s press adviser confirmed to the BBC that Karki would take the oath of office in the evening.

The agreement between the president and the protest leaders was reached after days of consultations. Legal experts were also involved.

Parliament is expected to be dissolved shortly, and the new government is tasked with conducting general elections within six months.

Karki is widely regarded as a person of clean image, and is being supported by student leaders from the so-called “Gen Z” to lead the interim government.

On Tuesday, she visited the protest site in Kathmandu where 19 people were killed in clashes with police the day before. She also met some of the injured who were being treated in hospital.

Karki was born in a family with close contacts with the Koirala political dynasty from the country’s largest democratic party Nepali Congress, and later married the then leader party Durga Subedi.

She has said that her husband’s support played a major role in her journey from a lawyer to Nepal’s chief justice in 2016.

But Karki has not been free from controversy, having even faced an impeachment incident during her nearly 11-month tenure as chief justice.

Nepal’s army has deployed patrols on the streets of Kathmandu, as the country reels from its worst unrest in decades.

The protests were triggered by the government’s decision last week to ban 26 social media platforms, including WhatsApp, Instagram and Facebook – but they soon widened to embody much deeper discontent with Nepal’s political elite.

In the weeks before the ban, a “nepo kid” campaign, spotlighting the lavish lifestyles of politicians’ children and allegations of corruption, had taken off on social media.

And while the social media ban was hastily lifted on Monday night, the protests had by that stage gained unstoppable momentum.