Lebanon's Prime Minister Saad Hariri has said he is resigning, amid protests that have gripped the country for almost two weeks.
Mr Hariri said Lebanon had reached a deadlock and needed a shock to break the crisis.
The announcement was met with cheers from protesters in Beirut.
The protests over political corruption and economic turmoil, began after now-scrapped plans to tax WhatsApp calls were introduced in mid-October.
Lebanon has one of the highest debt levels in the world.
The protests have led to a 10-day closure of banks, with many other offices, schools and universities also shut.
What did Mr Hariri say?
In a televised address, the prime minister said he had reached a "dead end" and that he would tender his resignation and that of the government to President Michel Aoun.
Mr Hariri said: "For 13 days, the Lebanese people have waited for a decision for a political solution that stops the deterioration. And I have tried, during this period, to find a way out, through which to listen to the voice of the people."
But he added: "It has become necessary for us to make a great shock to fix the crisis.
"Posts come and go, what matters is the safety and dignity of the people."
President Aoun is still to comment. If the resignation is accepted, the constitution would require Mr Hariri to stay on until a new administration is established.
What is the state of the protests?
The prime minister's announcement came as the situation on the ground turned increasingly violent, reflecting the deep-seated schism in Lebanese society.
The militant Shia group, Hezbollah, which has dominated the coalition government led by Mr Hariri, a Sunni, has recently hardened its stance against the protests.
On Tuesday, black-clad men loyal to Hezbollah and another Shia group, Amal, ransacked a protest camp in central Beirut, chanting slogans, setting tents on fire and beating anti-government demonstrators. A roadblock set up by protesters was also attacked.
Riot police and troops fired tear gas to separate the rival groups.
The protesters remained defiant in central Beirut. Less than an hour after being attacked they erupted into applause at the announcement of Mr Hariri's resignation.
One demonstrator, Tima Samir, told Agence France-Presse: "This resignation is welcome but it is not enough... We want the entire system to change and we'll stay on the streets until all our demands are met."
So what happens next?
Analysis by the BBC's Rami Ruhayem in Beirut
Here in the capital, protesters cheered loudly as the PM announced his resignation. But the announcement brought little clarity on the way forward.
Mr Hariri said he'd reached a dead end, implying he's pulling back, leaving the mess to his governing coalition partners. But then he said that "we" need a way to fix the economy and protect the country, implying that whatever happens next, he will be part of it.
The president will now have to consult parliament to form another government - but parliament is made up of the same factions that are in the outgoing coalition.
Whatever they do, they will do it under intense pressure - from the protest movement and from a deepening economic and financial crisis.
How did we get to this point?
Simmering resentment at corruption, a dysfunctional government and its handling of the economy boiled over on 17 October when the government announced a new tax for calls made via voice-over-internet-protocol (Voip), used by apps like WhatsApp, Facebook Messenger and Apple's FaceTime.
The government backtracked within hours but the protests were soon under way and quickly burgeoned.
As one demonstrator said: "We are not here over the WhatsApp, we are here over everything: over fuel, food, bread, over everything."
Last week, Mr Hariri and his coalition, including Hezbollah, agreed to a plan of reforms to try to placate protesters, but their campaign continued.
On Friday, Hezbollah's leader, Hassan Nasrallah, said "someone is trying to pull [Lebanon]... towards a civil war", suggesting the protests were funded by foreign powers and indicating a harsher policy towards the protesters.
Hezbollah had argued against Mr Hariri's resignation, saying it could result in a void in Lebanese government.
The BBC's Martin Patience says many in the population are tired of economic stagnation, endemic corruption and a lack of basic public services.
He adds that the developments will alarm the West, which regards Lebanon as an island of relative stability in a turbulent Middle East.
The power-sharing agreement that ended the country's civil war 30 years ago has kept the peace, but it has failed to halt the slide towards economic crisis.