Mr Hariri's express and sombre televised address was met by cheers from crowds of protesters who have remained mobilised since October 17, crippling the country to press their demands.

"It has become necessary for us to make a great shock to fix the crisis. I am going to the Baabda Palace to submit the government's resignation," Mr Hariri said.

He said his decision comes "in response to the will of many Lebanese who took to the streets to demand change" in protests he called "historic".

The move, which marks the most significant win by demonstrators yet, will restart the complicated task of parliament forming a new government if it is accepted by the president.

It came after days of apparently unfruitful efforts to reshuffle posts among his uneasy coalition partners and also as tension mounted on the ground between protesters and security forces bent on re-opening the country for business.

In his speech, he said he had reached a deadlock, urging the political class to protect the country.

Sami Nader, director of Levant Institute for Strategic Affairs, said "Hariri is opening the door to a solution because the resignation is the only way for a decent exit from the current crisis."

'Not enough'

France, one of Mr Hariri's top allies and Lebanon's key partner in a crucial $16-billion aid plan, voiced its fears that the resignation would "make the crisis even more serious".

A nationwide cross-sectarian protest movement has gripped Lebanon for almost two weeks, calling for an overhaul of a political class viewed as incompetent and corrupt.

Banks and schools have remained closed and the normally congested main arteries in Beirut blocked by protesters, despite the government's adoption of an emergency economic rescue plan last week.

AAP

After Mr Hariri's announcement, protestors across the country erupted in applause.

Hundreds gathered in the northern city of Tripoli, a stronghold of the Sunni prime minister, as well as the southern city of Sidon, from where his family hails.

In Tripoli, home to festive protest raves, large crowds gathered in the main al-Nour square waving the Lebanese flag.

"This resignation is welcome but it is not enough. It is only one part of a larger list of demands," said Tima Samir, a 35-year-old mother of two.

"We want the entire system to change and well stay on the streets until all our demands are met."

In Sidon's central square, people sang and danced, as stores gave away free sweets.

Ahed Madi, a demonstrator, said the festive scenes in the city were especially "symbolic."

"Saad Hariri is from this city and this city has always embraced him. But today, the people want change," he told AFP.

Protesters have insisted on a complete overhaul of the country's sectarian-based governance and celebrated the emergence of a national civic identity.

Tens of thousands of people joined hands across the country on Sunday, from Tripoli in the north, to Tyre in the south, to symbolise a newfound national unity.

Riots

The protests had been relatively incident-free, despite tensions with the armed forces and attempts by party loyalists to stage counter-demonstrations.

But prior to Mr Hariri's speech, dozens of rioters descended on a rally site near the government headquarters, where they attacked protesters, torched tents, and tore down banners calling for "revolution", said an AFP correspondent in the area.

They dismantled podiums and broke speakers as streams of people flooded out in panic.

"There are political orders to attack. This was not spontaneous," said one demonstrator alluding to Amal and Hezbollah, neither of which were spared by protesters, including from their own base.

An hour earlier, the same counter-demonstrators had gathered on a nearby road where they attacked peaceful protesters who were blocking the key artery, another AFP reporter said.

The counter-protesters chanted slogans hailing the leaders of two Shiite movements - Hezbollah chief Hassan Nasrallah and Amal head Nabih Berri - as they pushed roadblocks aside and provoked protesters.

Lebanon's political leaders have appeared shell-shocked, trying simultaneously to express sympathy for the movement while warning of turmoil in the case of a power vacuum.

Mr Hariri last week announced a package of economic reforms which aims to revive an economy that has been on the brink of collapse for months.

While his coalition partners have supported the move, protesters have accused the political elite of desperately attempting to save their jobs and have stuck to their demands for deep, systemic change.