KP Sharma Oli resigned as Nepal's prime minister on Tuesday, after 19 people were killed and hundreds injured in clashes between police and protesters over a social media ban.
The government also ended the days-old social media prohibition, saying it was now “addressing the demand of Gen Z”.
"I have resigned from the post of prime minister with effect from today ... in order to take further steps towards a political solution and resolution of the problems," Mr Oli, 73, said in a letter to President Ram Chandra Paudel.
Anger at the government showed no sign of abating on Tuesday, as protesters broke into parliament and set the building ablaze in Kathmandu, in defiance of an indefinite curfew.
"Hundreds have breached the parliament area and torched the main building," said Ekram Giri, spokesman for the Parliament Secretariat.
Demonstrators also attacked and set fire to the home of Mr Oli, media in Nepal reported. Elsewhere in the capital, they set fire to tyres, threw stones at riot police and chased them through narrow streets as thick black smoke rose into the sky.
Reports said 19 people have been killed and 347 people injured in clashes.

Mr Oli's resignation plunges Nepal deeper into political uncertainty as the country's worst unrest in decades continues.
Prithvi Subba Gurung, Minister for Communication, Information and Broadcasting, announced the government had withdrawn its decision to ban several social media platforms after an emergency cabinet meeting on Monday.
Last week, Nepal banned platforms including Facebook, X and YouTube that had failed to register with the government. The government had said the new regulations would prevent fake news, hate speech and cybercrime.
Protesters said the restrictions reflected the government’s authoritarian attitude and accused it of failing to tackle widespread corruption.
Mr Gurung has asked the protesters to call off their demonstrations. “Since protests were being staged using this issue as a pretext, the decision has been taken to reopen social media sites,” he said.
Although the social media ban was the cause of this week’s unrest, the protests reflect deeper frustrations among Nepal’s youth over joblessness and inequality.
More than 20 per cent of the country’s 30 million people live in poverty, according to the World Bank, while the most recent official figures estimate youth unemployment at 22 per cent.
Human rights groups urged authorities to respect freedom of expression and comply with basic principles on the use of firearms by law enforcement officials.
“We have received several deeply worrying allegations of unnecessary or disproportionate use of force by security forces during protests organised by youth groups,” UN Human Rights Office spokeswoman Ravina Shamdasani said on Monday.
Nepal’s cabinet has formed an investigation committee to look into the violence and has been given 15 days to prepare a report, according to Indian media outlet NDTV.
Nepal, in the southern part of the Himalaya mountains, lies between India and China, and has vast hydropower potential. The country shares strong economic and political ties with India, but has grown closer to China over the years through Beijing’s investment in infrastructure projects.











