BEIRUT — Lebanese Prime Minister Saad Hariri announced he is submitting his resignation during a televised address Tuesday, after nearly two weeks of anti-government protests that have paralyzed the country and led Hariri to suggest that he is out of options to fix the country’s problems.

“I have reached a dead-end, and we need a big shock to counter this crisis,” he said. “My call to all the Lebanese is to prioritize the interest of Lebanon, the safety of Lebanon, the protection of civil peace, and the prevention of economic collapse before everything else.”

Lebanon has been rocked by 13 days of massive demonstrations against the political class, spurred by outrage over corruption and a deep economic crisis. The protests, which started Oct. 17 with anger over a proposed tax on WhatsApp calls, have stopped traffic on highways in Beirut and around this country of 4 million as thousands of demonstrators set up tents and occupied streets and squares. Banks and schools have been closed for more than 10 days.

The demonstrations turned violent Tuesday as supporters of Hezbollah, a powerful Shiite group that is part of the Lebanese government, and the Hezbollah-allied Amal Movement attacked protesters and set fire to their tents. The Lebanese army was dispatched to restore calm, and public squares across Beirut later filled with protesters cheering Hariri’s resignation.

“In less than two weeks, we brought down a government of powerful and rich politicians,” said Manal, an unemployed mother of three from the Hezbollah-dominated Dahieh suburb of Beirut who was protesting in Beirut’s Martyrs’ Square Tuesday afternoon. She spoke on the condition that only her first name be used out of fear of reprisal. “Wait until we take down their leaders one by one. Who will they go to?”

The Lebanese government is a sectarian power-sharing system. Parliamentary seats are divvied up based on sect. The president must be Maronite Christian, the prime minister Sunni Muslim, and the speaker of parliament Shiite Muslim.

The protests, which largely opposed this system, brought together Lebanese people from every sect. Since the beginning of the protests, demonstrators have chanted a line about Muslims and Christians standing together and cursed the political elite.

Protesters had 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 Hezbollah.

Pressure from the protests pushed Hariri to set a 72-hour deadline early last week for himself and his government to respond to the protesters’ demands. He produced a package of reforms, including halving officials’ salaries and setting up an anti-corruption committee. But the protests did not stop.

“The people have demands; they are not playing politics,” actress Anjo Rihane said in Martyrs’ Square on Tuesday. “It doesn’t matter if the prime minister and his government were the weakest link or not, or if they had the actual power or not. What matters is that — for the first time in Lebanon’s history — the people came together and took down this government.”

During a speech Friday, Hezbollah leader Hasan 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, who has served as prime minister since 2016, was only one of several politicians whose resignation the protesters have demanded in recent days. Others include Aoun, the president, and Bassil, who has become a central figure in the calls to end the rule of the same political class for decades.

Tuesday marked the second time Hariri has announced his resignation: The first was from Saudi Arabia two years ago. Reading from a paper in front of him, Hariri said he feared assassination and blamed Iran and Hezbollah for causing chaos in the region. Aoun refused to accept the resignation while Hariri was abroad, and the prime minister rescinded his withdrawal after returning to Lebanon.

After his most recent announcement, Hariri headed to the presidential palace, where he submitted his letter of resignation to Aoun, who must accept it in order for it to become official. Hariri’s letter called for the “creation of a new government that is able to face challenges and defend the higher interests of the Lebanese people,” state news agency NNA reported.

Later Tuesday, protesters flowed in Beirut’s squares. Women led a crowd in chants: “For you, Beirut, this revolution will not die.”