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.'

While the prime minister has stepped down, it's not clear who will replace him - or what happens next in the political landscape, with many leaders reportedly seeking refuge with security forces.

In the chaos, jubilant scenes broke out inside the parliament as hundreds of protesters danced, chanting slogans, and waving Nepal's flag amid the destruction.

Muna Shreshta, a Kathmandu resident, expressed her desire for change, emphasizing the long-standing issue of corruption and the need for accountability from those in power.

Last week, the government had ordered a ban on 26 social media platforms, which was perceived as a direct attack on freedom of speech and a catalyst for the protests.

Despite the ban being lifted, the protests had already gained unstoppable momentum, leading to calls for political reform targeting the political elite.

Protesters had attempted to storm the parliament, leading to numerous casualties and a tense standoff with security forces.

Following threats addressed to protesters, the political landscape remains uncertain as discussions commence around a potential successor to Oli.