Algeria's ailing president Abdelaziz Bouteflika has announced his resignation with immediate effect, following months of protests against his rule.
State television announced on Tuesday that Bouteflika "officially advised the Constitutional Council of the end of his term of office as president of the republic."
The 82-year-old had been in power for the past 20 years, but was reportedly in poor health and had rarely appeared in public after suffering a stroke in 2013.
Based on the Algerian constitution, the speaker of the upper house of parliament should act as interim leader for up to 90 days to organize a presidential election following an official resignation of the president.
The resignation came a few hours after the military had demanded the president's impeachment, dismissing the presidential office's announcement a day earlier that Bouteflika would resign before his mandate runs out towards the end of this month.
In the military statement issued earlier today, Armed forces chief Ahmed Gaid Salah called for "the immediate application of the constitutional procedure for removing the head of state from power."
The announced resignation prompted celebrations as crowds gathered and car horns sounded in the streets of the capital city of Algiers.
Mass protests began across the country after Bouteflika announced his bid for a fifth term in office in February. Under increasing pressure, the Algerian president ultimately dropped his bid for another term, but protests continued, demanding that he step down.
The protesters have expressed their disapproval of the country’s old political system, which is dominated by veterans of the 1954-1962 independence war against France, who include the newly resigned president.
Opponents have cited suspicion that the president had been kept in office to protect interests of the military and business elite.