BEIRUT — Lebanese Prime Minister Saad Hariri said he is submitting his resignation from his post, during a televised address on Tuesday, the 13th day of protests that have paralyzed the country.

“I have reached a dead-end,” Hariri said. “And we need a big shock to counter this crisis.”

Speaking to the country from his residence, Hariri said his resignation is in response to the protesters’ demands and to show his commitment to protecting the country. Lebanon’s president must accept the resignation in order for it to take effect.

Demonstrators — calling for action against corruption and solutions to the economic crisis — have demanded Hariri’s resignation, but his supporters worry that his withdrawal from government will give power to his opponents, which include President Michel Aoun and his son-in-law, Foreign Minister Gebran Bassil, and to the Hezbollah group, a powerful militia that is part of the Lebanese government.

The prime minister’s announcement came as Hezbollah supporters attacked protesters Tuesday, setting fire to tents and beating up demonstrators. The Lebanese Army was dispatched to stop the violence, and public squares across Beirut filled with protesters shortly after.

Hezbollah supporters clash with Lebanese riot policemen during a protest in Beirut on Tuesday. (Bilal Hussein/AP)

During a speech on Friday, Hezbollah leader Hassan Nasrallah said the protests were no longer “spontaneous” and that they were funded by foreign embassies and countries, and he urged his supporters to avoid the protests.

He also said he opposed the fall of the government, warning that a power vacuum might be part of “someone preparing for a civil war, as they have in several regional and neighboring countries.”

“A vacuum would be a killer,” he said.

Hariri was only one of several politicians whose resignation the protesters have demanded in recent days. Others include Aoun and Bassil, who has become a central figure in the calls to end the rule of the same political class for decades.

For nearly two weeks, makeshift checkpoints have stopped traffic on highways in Beirut and around the country. Protesters have set up tents and occupied streets and squares and highways all over Lebanon. Banks and schools have been closed for more than 10 days.

Asser Khattab contributed reporting.