Angolan President and MPLA leader Jose Eduardo dos Santos attends a party central committee at a meeting in Luanda, Angola, December 2 ,2016.
Angolan President and MPLA leader Jose Eduardo dos Santos attends a party central committee at a meeting in Luanda, Angola, December 2 ,2016. Reuters / Herculano Coroado Bumba

Angola's former president Jose Eduardo dos Santos, who ruled Africa's second-biggest oil producer for nearly four decades, died on Friday, the presidency said.

The 79-year-old died at the Teknon clinic in Barcelona, Spain, where he was being treated following a prolonged illness, according to the statement.

One of Africa's longest serving leaders, dos Santos stepped down five years ago. His rule was marked by a civil war lasting nearly three decades against U.S.-backed UNITA rebels, which he won in 2002, and a subsequent oil-fuelled boom.

His successor, President Joao Lourenco, declared five days of national mourning and described dos Santos as a "unique figure of the Angolan homeland."

Despite being handpicked by dos Santos to succeed him, Lourenco swiftly moved to investigate allegations of multi-billion dollar corruption during the former president's era.

Portugal's President Marcelo Rebelo de Sousa hailed the good relationship fostered by dos Santos between the two countries.

South African President Cyril Ramaphosa said dos Santos had helped in the fight against white minority rule under apartheid.

Dos Santos' daughter Tchiz? dos Santos said in an Instagram post that "fathers never die because they are the truest love that children know in all their lives. They live forever within us".

Her lawyer, Carmen Varela, said she has asked the clinic where he died to keep his body in Spain for a full autopsy rather than it being returned directly to Angola. The clinic declined to comment.

Angolan journalist and rights activist Rafael Marques de Morais, an outspoken critic of dos Santos, wrote earlier this week on an anti-corruption website that dos Santos' political legacy "will not be missed but it leaves suffering".

Tributes and criticism also came from ordinary citizens. J?lia Jo?o, a 44-year old homeworker in Luanda, said dos Santos had presided well over the peaceful transition after the war, but squandered the chance to transform Angola.

"It was a lost opportunity for Angola," she said.