Lebanon’s prime minister, Saad Hariri, has announced his resignation, in a move set to spark further uncertainty in a country paralysed by political dysfunction and nationwide protests.

Hariri’s announcement came several hours after hundreds of youths overran protest sites in downtown Beirut, ransacking tents and stalls set up by demonstrators who, for the past 13 days, have demanded an overhaul of the ruling class and an end to rampant corruption.

The embattled leader said he intended to make a “positive shock” by quitting, claiming that doing so served “the country’s dignity and safety”. Over the past fortnight, he has tabled reforms, including the abolition of several cabinet positions and some cuts to spending, but the moves have fallen short of the structural changes demanded by protesters.

Saad Hariri. Photograph: Mohamed Azakir/Reuters

The protests have left politicians scrambling unsuccessfully to react and have exposed the depth of feeling in Lebanon, where an imminent economic collapse threatens to cripple the country’s banking system and social fabric.

The depth of the crisis and lack of political solutions have galvanised Lebanese citizens from all political persuasions and walks of life, leading to a movement that shows little sign of slowing down, even after the main protest site was ransacked on Tuesday.

The assault was blamed by demonstrators on two factions, Hezbollah and Amal, whose political leaders do not support a change in government. The Hezbollah leader, Hassan Nasrallah, the most powerful figure in Lebanon despite not holding an official position, has warned of chaos if protests were allowed to continue.

Hariri’s supporters spent much of Tuesday trying to talk him out of quitting, fearing even deeper instability in Lebanon, where political uncertainty and extreme levels of government debt have caused widespread alarm and spilled over into mass demonstrations, the scale of which had not been seen for more than a decade.

“I know for sure that the main target is the top of the system,” said Ali Dirani, a 33-year-old protester. “I don’t expect a domino effect; what I expect is that Hariri is expendable for the regime that we’re trying to topple. What people should focus on now is that we need to find an alternative. We have a problem that is rooted in the system of decision-making and the relationship between citizen and state.”

Over the past fortnight, the streets of central Beirut have become a forum for debate and defiant demands for change. Emboldened by the cross-sectarian movement and sensing there is more to lose by staying home, protesters have been unusually strident in their criticism of leaders, including Hariri and Nasrallah and dynasties that have run the country since the end of the civil war.

Much of the country’s political leadership remains invested in a status quo of a weak central government and institutions being run as political fiefdoms. There are some who are not interested in the type of reform being demanded on the street, according to Maha Yahya, the director of the Carnegie Middle East centre.

Albert Letayf, a senior investment banker at Levantine Partners consultants, said: “The young guys I’m speaking with have a new way of looking at things. They are saying: ‘We have all been deceived and we are not leaving until we have changed all these leaders’.”

Camille Abu Sleiman, who resigned as labour minister earlier this month, said: “Although late, we welcome his resignation and hope he will go through with it, as the people of Lebanon have clearly lost confidence in this government.”

Rose, 26, was protesting in central Beirut when she heard that Hariri had gone. “We just want to say that this is the first out of many,” she said. “We’re waiting for the others to show some dignity. But I doubt they have it.”

Letayf said confidence in the economy had disappeared, making a recovery impossible without real political reform. Lebanon is heavily dependant on foreign aid and money sent home by expatriates. Earlier this year, France pledged up to $11bn in return for structural reforms, which cut to the heart of ingrained corruption.

However, the French president, Emmanuel Macron, has so far withheld payment because the political class has been reluctant to make changes.

“We’re at a point now where Macron can’t send money to Hariri or anyone else, because his deputies will rightly say half the country is on the streets saying they’re corrupt,” said Maha Yahya. “Things cannot go back to the way they were. This is a tipping point.”

“People feel there is nothing to lose. There is now such broad opposition to political sectarianism across the spectrum and that is a real change that many thought they would never see. The restoration of Lebanese identity is powerful.”

Additional reporting by Nadia al-Faour