Nepal’s Prime Minister Khadga Prasad Oli resigned Tuesday, a day after police opened fire on demonstrators protesting a government ban on several social media platforms and amid widespread anger over alleged corruption that saw some of the country’s senior political leaders’ homes set ablaze.

The resignation came after Monday’s rallies swelled to tens of thousands in Kathmandu and other cities, when security forces fired on crowds outside the Parliament complex, leaving at least 19 people dead, according to government and hospital officials. Protesters then attacked residences of top leaders, including those of Sher Bahadur Deuba, leader of the Nepali Congress; President Ram Chandra Poudel; Home Minister Ramesh Lekhak; and Pushpa Kamal Dahal, leader of the Communist Party of Nepal (Maoist).

Authorities imposed an indefinite curfew in the capital and other cities and ordered schools in Kathmandu closed as violence continued into Tuesday. The government said the temporary block on widely used platforms such as Facebook, X and YouTube was lifted early Tuesday; the restrictions had been imposed after those companies did not comply with a new requirement to register and submit to oversight under a proposed social media law.

Monday’s demonstrations began as opposition to the registration requirement and related oversight measures but were fueled by broader public frustration with corruption and economic stagnation, particularly among younger Nepalis. Demonstrators chanted slogans including “Punish the murders in government. Stop killing children,” and carried national flags as crowds surrounded Parliament and later moved to attack party offices and residences.

Hospital officials said at least seven of those killed and dozens more wounded were taken to the National Trauma Center, Kathmandu’s principal emergency hospital. “Many of them are in serious condition and appear to have been shot in the head and chest,” Dr. Badri Risa of the Trauma Center told reporters. Families waited outside hospitals and people lined up to donate blood for the injured.

Oli announced he would step down immediately in a brief statement on Tuesday. He also said he was forming an investigating committee to deliver a report within 15 days, and that compensation would be provided to the families of those killed and that the injured would receive free treatment. Home Minister Ramesh Lekhak resigned at an emergency Cabinet meeting late Monday.

Protesters set fire to a private school owned by the wife of former Prime Minister Deuba, who is the current foreign minister, and vandalized party offices, video and local media showed. Some of the protesters identified themselves as part of a movement dubbed the “Gen Z protest,” a reference to younger demonstrators born roughly between 1995 and 2010 who have been active in the street actions.

The proposed social media bill would require more than two dozen international platforms to register with Nepali authorities, appoint a local point of contact and comply with content rules critics say could enable censorship and be used against government opponents. Rights groups and critics in Nepal have warned the measure could curtail freedom of expression and fundamental rights. The government said the law was intended to ensure platforms are “properly managed, responsible and accountable.”

Several platforms, including TikTok and Viber, registered and continued operating without interruption, officials said. News organizations reported that companies such as Meta, Google and the owner of X had not responded to requests for comment on the restrictions.

The violence marks one of the deadliest crackdowns in Nepal in recent years and reflects rising public anger with political leaders widely blamed by demonstrators for corruption and economic decline. Protesters and some opposition figures called for the current government to be ousted; others demanded an independent inquiry into the killings and accountability for those responsible.

Security forces said they used live ammunition after clashes escalated around the Parliament precinct, but officials have not publicly released a full account of the decisions that led to the use of force. Investigations and the government-commissioned report are expected to address those actions and the broader sequence of events.

Authorities continued to enforce curfews and restrict movement in parts of the capital on Tuesday as officials sought to restore order. International governments and rights groups called for restraint and for an impartial investigation into the deaths, while hospitals and aid groups urged people to donate blood and help the wounded.

The situation remains fluid, with political leaders and security officials under pressure to explain the use of force and to respond to demands for accountability and political change.