LUANDA/BARCELONA, July 8 (Reuters) – 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.

His successor, Angola’s current President Joao Lourenco, declared five days of national mourning and described dos Santos as “unique figure of the Angolan homeland, to which he dedicated himself from a very early age.”

He frequently described himself as an accidental president, taking the reins after Angola’s first leader, Agostinho Neto, died during cancer surgery in 1979.

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.

He was hospitalised in Spain and placed in intensive care after suffering a cardiac arrest on June 23.