KATHMANDU, Nepal — At least 19 protesters were killed as security forces moved against demonstrations sparked by a government ban on popular social media platforms, prompting Prime Minister K.P. Sharma Oli to resign and the government to withdraw the short-lived restriction.

The unrest, led largely by teenagers and young adults, began after the government ordered the temporary blocking of apps and moved to advance a bill that would require platforms to register and submit to local oversight. Rights groups said the measure threatened freedom of expression and could be used to punish dissent; protesters called the ban a catalyst that exposed long‑running anger over corruption and nepotism in Nepali politics.

Authorities said the deaths occurred when security forces used live ammunition and other force to disperse crowds after some demonstrators attacked buildings, burned vehicles and set fire to the homes of several senior political figures. Protesters said demonstrations began peacefully and only turned violent after police fired on the crowds. Nima Tendi Sherpa, 19, said he was shot in the arm on Monday and that police firing came after protesters sought to breach barricades. "I don't have any harsh feelings toward the policemen. They were just doing their duty by following orders. But I am angry and enraged at the ones who gave those orders," he said.

Oli announced his resignation on Tuesday, acknowledging the seriousness of the unrest but without immediately laying out a transition plan. The ban on social media platforms was reversed shortly afterward. It remained unclear whether the reversal and the prime minister's departure would end the protests, which spread Tuesday to suburbs of Kathmandu and other parts of the country.

Analysts and local journalists said the social media restrictions served as a spark for deeper grievances among a generation that has grown increasingly disillusioned with Nepal's political class. "Protests over the social media ban were just a catalyst. Frustrations over how the country is being run have long been simmering under the surface," said Prateek Pradhan, editor of Baahrakhari, an independent Nepalese news website. "People are very angry and Nepal finds itself in a very precarious situation."

In the weeks before the ban, social media users—particularly on the video platform TikTok—had circulated posts highlighting the lavish lifestyles of politicians' children, drawing attention to growing inequality in a country with a per capita income of about $1,400 a year. Demonstrators also cited frustration over the government's failure to pursue major corruption cases and a lack of economic opportunities for youth; the World Bank reported last year that Nepal's youth unemployment rate was about 20 percent.

Those grievances have been inflamed by a history of political instability. Since the end of the monarchy and the drafting of a republic, Nepal has cycled through a string of short-lived administrations; the country has had 13 governments since 2008. The current unrest is some of the worst in decades and has drawn comparisons to the 2006 uprising that forced the king to cede authoritarian power and led to the abolition of the monarchy two years later.

Ashish Pradhan, a senior adviser with the International Crisis Group, said a swift transitional arrangement should include figures who retain credibility with Nepalis, particularly young people, to prevent further deterioration. "A transitional arrangement will now need to be charted out swiftly and include figures who still retain credibility with Nepalis, especially the country’s youth," he said.

Rights organizations and foreign observers expressed concern about both the proposed social media oversight bill and the security forces' response to the unrest. Critics say the legal framework would give authorities sweeping powers to control content and compel companies to cooperate with state surveillance and takedown requests. The government has defended the proposal as necessary for regulating misinformation and protecting public order.

Earlier this month, two people were killed in clashes between supporters of Nepal's former king and police during a rally in Kathmandu that sought restoration of the monarchy, underscoring the depth of political polarization. Observers warn that removing the prime minister alone may not address the root causes of the protests, which include demands for accountability, more jobs and an end to perceived impunity for political elites.

As of Wednesday, it remained unclear who would lead a transition or how quickly a replacement government could be formed. Protesters have demanded broader political changes, including dissolution of parliament in some cases, a move that could deepen instability. Political leaders and parties face mounting pressure to propose credible reforms that could calm the streets and restore order without further bloodshed.

The violence and the government's initial attempt to restrict online platforms have drawn international attention, with calls for restraint and for investigations into the use of force. For many Nepalis who joined the demonstrations, the moment reflects a longer-standing demand for greater accountability and opportunities in a country where young people say they see few prospects.

Authorities said investigations into the clashes and the deaths would follow, but details about accountability, potential prosecutions and the scope of any inquiry were not immediately available. Meanwhile, many protesters signaled they would continue to press for change, leaving Nepal's political future uncertain as leaders and citizens weigh next steps.