Algeria’s President Abdelaziz Bouteflika has decided to resign after weeks of mass protests, state media report.
The 82-year-old, who has been in power for 20 years, had already dropped plans to seek a fifth term as opposition to his rule grew.
The Algerian army had called for the president to be declared incapable of carrying out his duties.
Abdelaziz Bouteflika suffered a stroke six years ago and has rarely appeared in public since.
Car horns could be heard in the streets of the capital, Algiers, as hundreds celebrated the announcement.
People waved Algeria’s national flags and sang.
News of the resignation came in a statement carried on state news agency APS.
The statement read: “The president of the republic, Abdelaziz Bouteflika, has officially notified the president of the constitutional council of his decision to end his mandate as president of the republic.”
State TV then reported that this would be with immediate effect.
According to the constitution, the Senate speaker should take over as interim president until fresh elections are held. The chairman of the upper house of parliament, Abdelkader Bensalah, is expected to become caretaker president for three months until elections.
Pressure had been building since February, when the first demonstrations were sparked by President Bouteflika’s announcement that he would be standing for a fifth term.
Tens of thousands protested across the country on March 1. Abdelaziz Bouteflika’s promise not to serve out a fifth term if re-elected, along with a change of prime minister, failed to quell the discontent.
Leaders of the protests also rejected President Bouteflika’s offer this week that he would go by the end of his current term – April 28 – as not quick enough.
It seems the powerful military agreed. Its chief, Lt. Gen. Ahmed Gaed Salah, said on April 2: “There is no more room to waste time.”
The protesters have also called for the whole political system, in which the military plays a significant role, to be overhauled.
Many of the demonstrators are young and say they want a new system of government.
There were accusations that Abdelaziz Bouteflika was being used as a front by “le pouvoir” – a group of businessmen, politicians and military officials – to retain their power.
Elections originally scheduled for April 18 were postponed and the governing National Liberation Front (FLN) vowed to organize a national conference on reforms.
The FLN has ruled Algeria since 1962, when the country won independence from France after seven years of conflict.
Abdelaziz Bouteflika, who came to power in 1999, strengthened his grip after a bloody civil war against Islamist insurgents which left 150,000 dead.