Prime Minister KP Sharma Oli has resigned amid Nepal's worst unrest in decades, as public anger mounts over the deaths of 19 anti-corruption protesters in clashes with police on Monday.

On Tuesday, crowds set fire to parliament in the capital Kathmandu, sending thick black smoke billowing into the sky. Government buildings and the houses of political leaders were attacked around the country.

Three more deaths were reported on Tuesday. Amid the chaos, jail officials said 900 inmates managed to escape from two prisons in Nepal's western districts.

The demonstrations were triggered by a ban on social media platforms. It was lifted on Monday - but by then, protests had swelled into a mass movement.

Nepal's army chief issued a statement late on Tuesday accusing demonstrators of taking advantage of the current crisis by damaging, looting and setting fire to public and private property.

It said if unrest continued, 'all security institutions, including the Nepal Army, are committed to taking control of the situation,' effective from 22:00 local time.

While the prime minister has stepped down, it's not clear who will replace him - or what happens next, with seemingly no one in charge. Some leaders, including ministers, have reportedly taken refuge with the security forces.

Inside parliament, there were jubilant scenes as hundreds of protesters danced and chanted slogans around a fire at the entrance to the building, many holding Nepal's flag. Graffiti and anti-government messages have been spray-painted on the exterior.

Kathmandu resident Muna Shreshta, 20, expressed hope for change, stating, 'It is high time our nation, our prime minister, and anyone in power changes, because we need to change.'

Last week, Nepal's government ordered authorities to block 26 social media platforms for not complying with regulations, leading to significant public backlash.

Although the ban was hastily lifted, protests had already gained unstoppable momentum, targeting an entrenched political elite and resulting in chaos.

The situation in Nepal continues to develop, with the possibility of further unrest looming as the government struggles to regain control.