He fought to free Algeria from colonizer France, he reconciled his war-ravaged nation and he negotiated with a famed terrorist. But Abdelaziz Bouteflika couldn't overcome mass discontent as his rule dragged on.
Bouteflika's office announced Monday that he agreed to step down before his term expires April 28, after 20 years as president. The move was a concession to six weeks of mass protests as the army chief and other powerful figures started turning against him.
Bouteflika had been known as a wily political survivor, but at 82 and diminished ever since a 2013 stroke, appeared to underestimate the depth of frustration with his stagnant leadership.
In Algeria's bloody independence war, he commanded the southern Mali front and slipped into France clandestinely in 1961 to contact jailed liberation leaders.
He later embodied the Third World revolutionary who defied the West, acting as a prominent voice for the developing nations movement. He stood up to the likes of Henry Kissinger at the height of the Cold War, and was active in the United Nations, where he presided over the U.N. General Assembly in 1974.
Bouteflika famously negotiated with the terrorist known as Carlos the Jackal to free oil ministers who had been taken hostage in a 1975 attack on OPEC headquarters in Vienna and flown to Algiers.
Yet Bouteflika stood firmly with the United States in the fight against terrorism after the Sept. 11 attacks, particularly on intelligence-sharing and military cooperation.
He came to the presidency after its darkest period, the 1990s Islamic insurgency. After taking power in 1999, Bouteflika managed to bring back stability to a country devastated by killings and distrust.
The insurgency then linked with al-Qaida and metastasized into a Sahara-wide extremist movement.
As president, age and illness took its toll, and corruption scandals dogged him and associates.
Bouteflika also failed to create an economy that could offer enough jobs for Algeria's growing youth population despite the nation's vast oil and gas wealth.
In a country where secrecy surrounds the leadership, it has never been clear whether Bouteflika was fully in charge or whether the powerful army was pulling the strings.
Aomar Ouali in Algiers, Algeria, and Angela Charlton in Paris, contributed to this report.