Beirut, Lebanon (CNN) Lebanon 's Prime Minister Saad Hariri announced Tuesday he was resigning, succumbing to the demands of protesters who have staged nationwide demonstrations for nearly two weeks.

The three-time prime minister has led a national unity government, which included some of his political adversaries, for less than two years. In recent months, the country saw rapid economic deterioration, ballooning debt and rising prices.

On October 17, the government proposed imposing a tax on Whatsapp calls, along with other austerity measures, sparking protests that paralyzed the country.

Lebanon has been under lockdown since the protests began. Banks and schools have been closed for 12 days, while protesters blocked major routes throughout the tiny eastern Mediterranean nation.

"I can't hide this from you. I have reached a dead-end," Hariri said in his resignation speech.

"To all my political peers, our responsibility today is how to protect Lebanon and to uplift the economy," he added. "Today, there is a serious opportunity and we should not waste it."

Scores of protesters in downtown Beirut cheered as Hariri announced his departure. At their peak, hundreds of thousands of people took to the streets to protest government corruption on Sunday.

Over the last week, protests have dwindled in number, concentrating on road closures on main routes as the economic crisis has deepened.

Chaos in downtown Beirut

Photos: Lebanon in crisis A Lebanese protester speaks into a megaphone on December 16 as demonstrators gather near the home of caretaker Prime Minister Saad Hariri in Beirut. Hide Caption 1 of 39 Photos: Lebanon in crisis Supporters of Lebanon's Shiite Hezbollah and Amal groups throw fireworks towards Lebanese riot police during clashes on December 14 in Beirut. Hide Caption 2 of 39 Photos: Lebanon in crisis Anti-government protesters scuffle with riot police on December 4 in Beirut. Hide Caption 3 of 39 Photos: Lebanon in crisis Demonstrators raise a giant fist sign that bears the Arabic word for "revolution" on November 22 in Martyrs' Square. Hide Caption 4 of 39 Photos: Lebanon in crisis People take part in an Independence Day event on November 22. Lebanon marked 76 years of self-rule, with nationwide festivities organized by anti-government protesters in lieu of a traditional military parade. Hide Caption 5 of 39 Photos: Lebanon in crisis A Lebanese protester kisses the helmet of a riot policeman on November 19 near the parliament headquarters in Beirut. Hide Caption 6 of 39 Photos: Lebanon in crisis Cars navigate a flaming barricade set by anti-government protesters in the southern city of Sidon on November 19, ahead of a parliament session. Hide Caption 7 of 39 Photos: Lebanon in crisis A mourner lights a candle at a makeshift memorial where Alaa Abu Fakher was killed by a Lebanese soldier during Tuesday night protests south of Beirut in Khaldeh neighborhood on November 13. Fakher was the first to be killed in direct shooting related to the protests, though there have been four other deaths since the demonstrations began. Hide Caption 8 of 39 Photos: Lebanon in crisis Riot police remove anti-government protesters who were occupying an intersection in Beirut, Lebanon, on Monday, November 4. Hide Caption 9 of 39 Photos: Lebanon in crisis Protesters perch on an overhead road sign in Beirut on November 4. Hide Caption 10 of 39 Photos: Lebanon in crisis Police move an anti-government protester on Monday. Hide Caption 11 of 39 Photos: Lebanon in crisis Protesters light flares and chant slogans against the Lebanese government on Sunday, November 3. Hide Caption 12 of 39 Photos: Lebanon in crisis An aerial view shows thousands of Lebanese protesters gathered in Beirut's downtown district on Sunday. Hide Caption 13 of 39 Photos: Lebanon in crisis Supporters of embattled Lebanese President Michel Aoun take part in a counter-protest near the presidential palace in Baabda on November 3. Hide Caption 14 of 39 Photos: Lebanon in crisis Demonstrators chant slogans during a rally on Sunday. Hide Caption 15 of 39 Photos: Lebanon in crisis An anti-government protester waves a Lebanese flag as he stands on top of a pile of broken tents in Martyrs' Square on October 29. Hide Caption 16 of 39 Photos: Lebanon in crisis Lebanese Prime Minister Saad Hariri speaks during an address to the nation on October 29. "I can't hide this from you. I have reached a dead end," Hariri said in his resignation speech. Hide Caption 17 of 39 Photos: Lebanon in crisis Anti-government protesters celebrate outside the government palace after Hariri announced his resignation. Hide Caption 18 of 39 Photos: Lebanon in crisis Hezbollah supporters burn tents in the camp set up by anti-government protesters near the government palace. Hide Caption 19 of 39 Photos: Lebanon in crisis Members of the Lebanese army, left, help intervene between clashing groups of protesters and counter-protesters on a highway in central Beirut. Hide Caption 20 of 39 Photos: Lebanon in crisis An armored personnel carrier removes a burning garbage container set alight by anti-government protesters on Monday, October 28. Hide Caption 21 of 39 Photos: Lebanon in crisis Anti-government protesters play a dice game as they block a main highway during during demonstrations. Hide Caption 22 of 39 Photos: Lebanon in crisis Protesters hold hands to form a human chain along a coastal highway near Beirut on Sunday, October 27. Hide Caption 23 of 39 Photos: Lebanon in crisis A Lebanese demonstrator scuffles with security forces trying to disperse protesters who were blocking a major bridge in Beirut on Sunday, October 27. Hide Caption 24 of 39 Photos: Lebanon in crisis Anti-government protesters and Hezbollah supporters clash on Friday, October 25. Hide Caption 25 of 39 Photos: Lebanon in crisis Protesters and counter-protesters face off near the government palace on October 25. Hide Caption 26 of 39 Photos: Lebanon in crisis A protester uses a national flag to cover himself as it rains during a demonstration on Wednesday, October 23. Hide Caption 27 of 39 Photos: Lebanon in crisis Anti-government protesters wave flags and shout slogans as Lebanese soldiers encircle them on October 23. Hide Caption 28 of 39 Photos: Lebanon in crisis A rally takes place in Beirut outside the Mohammad al-Amin Mosque and the nearby Maronite Cathedral of St. George on Sunday, October 20. Hide Caption 29 of 39 Photos: Lebanon in crisis Police stand guard as anti-government protesters try to remove a barbed-wire barrier to advance toward government buildings on Saturday, October 19. Hide Caption 30 of 39 Photos: Lebanon in crisis Demonstrators wave flags as they gather in the southern city of Sidon on October 19. Hide Caption 31 of 39 Photos: Lebanon in crisis A protester holds a Lebanese flag as he sits in an inflatable pool on a highway in the town of Zouk Mosbeh on October 19. Hide Caption 32 of 39 Photos: Lebanon in crisis Lebanese soldiers stand guard in Beirut's financial district on October 19. Hide Caption 33 of 39 Photos: Lebanon in crisis A Lebanese demonstrator with her face painted like the comic book character the Joker takes part in a protest in Beirut on October 19. Hide Caption 34 of 39 Photos: Lebanon in crisis A protester rolls a tire toward a smoking roadblock in Beirut on Friday, October 18. Hide Caption 35 of 39 Photos: Lebanon in crisis Lebanese police use a water cannon on anti-government protesters on October 18. Hide Caption 36 of 39 Photos: Lebanon in crisis A demonstrator flashes a victory sign as he holds a national flag near a roadblock on October 18. Hide Caption 37 of 39 Photos: Lebanon in crisis Lebanese demonstrators burn wood and debris on Thursday, October 17. Hide Caption 38 of 39 Photos: Lebanon in crisis Demonstrators wave flags outside the government palace in Beirut on October 17. Hide Caption 39 of 39

Hariri's announcement came hours after chaos broke out in downtown Beirut when a mob stormed into the capital's main protest site, setting parts of it alight and tearing up tents on Tuesday afternoon.

Shouting "Shia, Shia" and singing chants in support of Hezbollah and Amal -- another Lebanese political party -- hundreds of men wielding sticks poured into the site, breaking up protest road closures and attacking demonstrators. Police fired dozens of rounds of tear gas to disperse the crowds.

The military was deployed to the streets of downtown Beirut, and many anti-government protesters have cleared the site. Earlier, female protesters tried to form a human chain trying to separate the demonstrators from the mobs.

Hezbollah's media office could not be reached for comment.

Beirut's main highway (the Ring) covered in tear gas as Hezbollah supporters flee the scene. Confrontations between Hezbollah and security forces are a rare sight in Lebanon, even as they become increasingly frequent since protests began two weeks ago. #Lebanon #لبنان_يتنفض pic.twitter.com/TCx2eHurkd — Tamara Qiblawi (@tamaraqiblawi) October 29, 2019

Calls had grown in recent days for Hariri and his government to resign. The Prime Minister's cabinet included adversaries such as Hezbollah, the Iranian-backed Lebanese militant and political organization.

Hezbollah chief Hassan Nasrallah last week said the protests were part of an international conspiracy aimed at toppling the group.

Political vacuum and economic crisis

Lebanon is no stranger to political vacuums, having been embroiled in multiple crises over the years that pitted Saudi-backed Hariri against Iran-backed Hezbollah. Hariri's national unity government, first formed in 2016, brought some years of stability as the two foes set aside their differences. But it also presided over a floundering economy.

Decades of government mismanagement and widespread corruption have crippled Lebanon's finances, adding pressure to the currency and causing the debt to swell. The country has one of the world's highest debt-to-GDP ratios and around a third of the its population lives under the poverty line, according to the World Bank.

Lebanese PM Hariri hands resignation to Lebanon President

Hariri's resignation could deepen the latest unrest and exacerbate the economic crisis. But protesters say it also presents an opportunity to shake off the country's sectarian system and transition into civil governance.

"There's a lot of unknowns. We've moved from a phase of celebration where people were coming together and showing solidarity in one where we don't know whats going to happen," said Karim Makdisi, associate professor of international politics at the American University of Beirut. "There's an official split in the street right now."

Hezbollah has opposed the government's resignation, with Nasrallah warning that it could lead the country "into the abyss."

Three-time prime minister

Hariri has been a major figure in the country's deeply divided political landscape since his father, former Prime Minister Rafik Hariri, was assassinated in February 2005. He emerged as a leader of the country's Sunni sect, and became mired in political battles with Hezbollah and its allies. The period was riddled with sporadic violence and stalemates.

In 2011, Hezbollah's coalition, which consisted of Christian and Shia allies, toppled Hariri's government while he was on a visit to Washington, DC. In 2016, a rapprochement between the two sides led to the formation of the national unity government under Hariri's leadership.

Clashes in downtown Beirut on Tuesday

Even if Hariri's resignation marks a possible return to old rifts, it also represents a step forward for Lebanon's protesters.

"The government's resignation is going to be taken by the protesters as a big victory. i don't think that should be underestimated," said Makdisi. "There is a victory on the one hand, and a possible security issue on the other."