Abdelaziz Bouteflika, who ruled Algeria for two decades before resigning in 2019 as huge protests engulfed the country, died on Friday aged 84, public television announced.

The former strongman had left office in April 2019 under pressure from the military, following weeks of demonstrations over his bid to run for a fifth term in office.

After quitting, he had stayed out of the public eye at a residence in western Algiers.

Bouteflika became president of Algeria in 1999 as the former French colony emerged from a decade of civil war that killed nearly 200,000 people.

Abdelaziz Bouteflika, ex-president of Algeria for two decades, has died aged 84 Abdelaziz Bouteflika, ex-president of Algeria for two decades, has died aged 84 Photo: AFP / RYAD KRAMDI

Dubbed "Boutef" by Algerians, he initially won respect for helping foster peace, notably with an amnesty law that prompted thousands of Islamist fighters to hand in their weapons.

Bouteflika went on to be elected for three more consecutive five-year terms, most recently in 2014.

Journalist Farid Alilat, who has written a biography of Bouteflika, says that at the height of his rule in the early 2000s, the president had "all the levers of power".

Crucially, he was backed by the army and the intelligence services.

Bouteflika came to power in 1999, and was elected for three more terms Bouteflika came to power in 1999, and was elected for three more terms Photo: AFP / -

"He became an absolute president," Alilat told AFP.

Algeria was largely spared the wave of uprisings that swept the Arab world in 2011, with many crediting still-painful memories of the conflict in the 1990s for keeping a lid on tensions.

But Bouteflika's rule was marked by growing corruption, leaving many Algerians wondering how a country with vast oil wealth could end up with poor infrastructure and high unemployment that pushed many young people overseas.

The Hirak anti-government movement continued after Bouteflika's ousting The Hirak anti-government movement continued after Bouteflika's ousting Photo: AFP / RYAD KRAMDI

In his later years, Bouteflika's ill health started weighing on his credibility as a leader.

Despite suffering a mini-stroke in April 2013 that affected his speech and forced him to use a wheelchair, he decided to seek a fourth mandate despite growing public doubts about his ability to rule.

His bid in 2019 for a fifth term sparked angry protests that soon grew into a mass movement against his regime.

When he lost the backing of the army, he was forced to step down.

The Hirak mass protests continued, with demands for a full overhaul of the ruling system in place since Algeria's independence from France in 1962.

But while some key Bouteflika-era figures were eventually jailed in corruption cases, including Bouteflika's powerful brother Said, the long-sought changes did not happen.

Bouteflika's successor Abdelmadjid Tebboune was elected in late 2019 on record low turnout, with the Hirak calling for a boycott.

A referendum on a constitutional amendment seen as aiming to torpedo the Hirak generated even less interest from voters.

But the protest movement was suspended because of the coronavirus pandemic and has struggled to regain momentum as the government cracks down on opposition.

According to the CNLD prisoners' group, around 200 people are in jail in connection with the Hirak or over individual freedoms.

And with the Bouteflika-era old guard still largely ruling the country, the legacy of two decades of his rule is mixed.

"For his entire life, Abdelaziz Bouteflika was driven by two obsessions: take power and keep it at any price," said Alilat.

"But it was this obsession... that sparked the revolt that drove him from power."