KATHMANDU, Nepal — Prime Minister K.P. Sharma Oli resigned Tuesday after security forces’ deadly response to mass protests over a short-lived ban on popular social media platforms left scores of people injured and at least 18 dead, according to media reports and witness accounts. The government rescinded the ban but the unrest has exposed deep public frustration over corruption, nepotism and limited economic prospects for young people.

The demonstrations began after the government temporarily blocked platforms and proposed a bill that would require social media companies to register and submit to local oversight. Critics and rights groups warned the measure could be used to censor dissent and curtail freedom of expression. The ban, which went into effect last week, was rolled back by the government as protesters poured into the streets and targeted political leaders, in some cases setting fire to their homes.

The demonstrations were led largely by teenagers and young adults often described as "Gen Z," who channeled anger from online platforms into street protests. Observers say the social media blackout acted as a spark for broader grievances. "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, a Nepalese independent news website.

In the weeks before the ban, viral posts on video-sharing platforms highlighted the lavish lifestyles of politicians’ children, underscoring stark inequality in a country with a per-capita income of about $1,400 a year. Protesters and analysts tied that online scrutiny to long-standing complaints that political elites and their families enjoy privileges while corruption goes unpunished and economic opportunities for youth remain limited. The World Bank reported Nepal’s youth unemployment rate at roughly 20% last year.

Witnesses and activists said what began as largely peaceful demonstrations turned violent when security forces fired on crowds trying to break police barricades. Protester Nima Tendi Sherpa, 19, said he was shot in the arm and described the escalation. "The protests began peacefully but turned violent when security forces started firing at the protesters who were trying to break the police barricades," he said. "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. Now that the fire has already started, I believe it must continue until we achieve true freedom."

Rights groups have condemned the proposed regulations and the use of force, saying both risk breaching fundamental rights. The government had defended the measures as a way to regulate harmful content and foreign platforms, but opponents argued the broad powers would allow political interference and repression.

The unrest spread beyond central Kathmandu to other parts of the country, including suburban districts, and included attacks on the residences of high-profile leaders. The violence is among the worst Nepal has seen in decades and has drawn comparisons to the 2006 uprising that helped end the monarchy. That earlier unrest led to the abolition of the monarchy two years later and a major restructuring of the state.

Nepal has experienced frequent political turnover in recent years, with 13 governments since 2008, and many citizens have grown disillusioned with repeated instability and slow progress on governance. Earlier this year, clashes between supporters of Nepal’s former king and police left two people dead during a rally seeking a return to monarchy, signaling persistent political fault lines.

Even with the prime minister’s resignation and the reversal of the ban, it remains unclear whether the concessions will satisfy protesters who have also demanded dissolution of the government. Observers caution that forcing a rapid political transition could create further instability in a country already grappling with economic challenges and institutional weaknesses.

Analysts say the episode reflects a broader regional pattern of youth-led movements mobilizing against entrenched political systems. "It appears people are just done with how things have been going on. They want a change," Pradhan said, drawing parallels to recent uprisings in neighboring countries that toppled governments.

The immediate aftermath will hinge on how Nepal’s political leadership, security forces and protest organizers negotiate a way forward. International rights groups and foreign governments have called for restraint, accountability for the violence and respect for freedom of expression as the country seeks to calm tensions and chart its next political steps.