Algeria's ailing President Abdelaziz Bouteflika resigned on Tuesday, succumbing to six weeks of largely peaceful mass protests driven by youth and pressure from the powerful army against his 20-year rule.
Hundreds took to the streets of the capital after state media announced the 82-year-old's departure, capping a wave of protests demanding the removal of an aging elite seen by many as out of touch with ordinary people and presiding over an economy riven by cronyism.
Bouteflika's supporters had sought to stop the dissent by telling Algerians not to return to the dark days in the 90s when some 200,000 were killed in civil war, warning even of a scenario like in Syria, embroiled in an eight-year-long conflict.
The protests stand in stark contrast to Algeria's neighbor Libya, where Moammar Gadhafi was toppled in a NATO-backed uprising that took much of 2011 and sent the country into chaos.
Only one person was confirmed to have died during the protests, a man around 60 years old who suffered a heart attack, with most rallies peaceful and with protesters cleaning up the streets before going home.
Bouteflika announced he was standing down in a one-sentence statement carried by state news agency APS, followed by a letter - his primary means of communication since suffering a stroke in 2013 and disappearing from public view.
"I have taken this step because I am keen to put an end to the current bickering," Bouteflika said in the letter. "I have taken the suitable measures needed for the continuity of the nation's institutions during the interim period."
His departure came after the army chief of staff had dramatically ratcheted up the pressure, demanding immediate action to declare him unfit for office under the constitution.
The military had stayed in their barracks during the protests but step by step increased pressure on Bouteflika's camp, first only indirectly in an army magazine saying the military shared the same vision as the people. Then chief of staff Lieutenant General Ahmed Gaed Salah proposed last week to invoke a constitutional clause to remove him.
Bouteflika on Monday had said he would quit before the end of his term on April 28 without giving a date. He had also vowed to undertake unspecified measures for the sake of stability, triggering new protests by students demanding a new political system.
Salah eventually said it was time to go for the only leader many Algerians have known, some 70 percent of whom are under 30 years old.
"There is no more room to waste time ... We decided clearly ... to stand with the people so all their demands get fulfilled," Salah said after a meeting with senior officers, APS said.
Hundreds took to the streets in the evening, waving Algerian flags or driving in convoys through the city centre, where on Feb. 22 mass protests broke out.
"The army and the people are one" and "Game over," banners read.
Pressure had been building during the day with opposition groups demanding Bouteflika go immediately, while hundreds of students marched through the capital Algiers to demand the replacement of a political system widely seen as incapable of significant reform.
"Bouteflika's decision (to resign by the end of his term) will change nothing," Mustapha Bouchachi, a lawyer and protest leader, told Reuters earlier on Tuesday.
Bouteflika's resignation will put Abdelkader Bensalah, chairman of the upper house of parliament, in charge as caretaker president for 90 days until elections are held.
Bouchachi had suggested Bouteflika's nomination of a caretaker government was a move to perpetuate the current political system.
"What is important to us is that we do not accept the (new caretaker) government. Peaceful protests will continue."
A veteran of Algeria's war for independence, Bouteflika was first elected president in 1999 and established himself by ending a civil war with Islamist militants that killed an estimated 200,000 people.
But the country remains mired in corruption and, in a sign that the end for Bouteflika's rule had been approaching, several oligarchs close to his camp were banned from traveling abroad in the past few days, part of a crackdown against his allies.
"The gang has made big money illegally taking advantage of its closeness with decision-makers," Salah said, according to APS.
The protests have been driven by the country's youth and lawyers demanding the removal of a ruling elite seen by many as out of touch with ordinary Algerians.