Jose Eduardo dos Santos, who ruled Angola with an iron fist for 38 years, died on Friday at a hospital in Barcelona after suffering cardiac arrest, the government said. He was 79.
With "great pain and consternation", the Angolan government said dos Santos died at 11:10 am (1010 GMT) at the Teknon Medical Centre.
Dos Santos had been admitted to hospital and placed in intensive care after suffering a cardiac arrest on 23 June.
The government "presents its deepest feelings of sorrow to the bereaved family," the statement read, describing the former leader as a "statesman of great historical stature" who led the country through very difficult times.
Angolan President Joao Lourenco, who is seeking re-election in August, said the country had suffered a "big loss". He declared five days of national mourning, starting Saturday.
A presidential decree ordered flags to be flown at half-staff and the cancellation of "all shows and public demonstrations".
Seldom seen in public, Jose Eduardo dos Santos was nonetheless a presence in daily life for most Angolans. He came to power in 1979, before stepping down in September 2017 after nearly four decades at the helm of the Portuguese-speaking, oil-rich state.
He maintained tight control throughout the country's devastating civil war, which ended in 2002, followed by an oil boom and recession in 2015.
Fears of foul play
The government gave no explicit cause of death in its statement, and one of dos Santos' daughters swiftly demanded the hospital retain his body for an autopsy over fears of foul play.
Angolan Foreign Minister Tete Antonio declined to comment on her accusations.
Welwitschia dos Santos, known as Tchize, had last Monday made a complaint to the Catalan regional police, alleging her father's condition was the result of attempted murder.
According to the complaint, the 44-year-old believes her father's wife, Ana Paula, and his personal physician are responsible for the deterioration in his health.
In Friday's statement, her lawyers said the complaint included allegations relating to "attempted murder, failure to exercise a duty of care, injury resulting from gross negligence and disclosure of secrets by people close to him".
Police confirmed receipt of the complaint and said they had opened an inquiry.
From slums to billionaire
Born in the slums of Luanda, dos Santos was one of Africa's longest-serving leaders, using his nation's oil wealth to turn one of his children into a billionaire while leaving his people among the poorest on the planet.
Despite controlling every aspect of Angolan life, he mismanaged his own transition away from power so badly that he ended up in temporary self-imposed exile, with a son in prison and a daughter facing international legal challenges.
When he stepped down, dos Santos handed over to former defence minister Lourenco, handpicked to replace him.
But Lourenco quickly turned on his former master, starting an anti-corruption drive to recoup the billions he suspected had been embezzled under dos Santos.
Dos Santos's son Jose Filomeno has been in prison since 2019 on corruption charges.
His eldest daughter Isabel was once named by Forbes as Africa's richest woman, worth $3 billion (2.55 billion euros). She now faces a slate of investigations into her multinational business dealings.
South African President Cyril Ramaphosa paid tribute to dos Santos, saying his roots, exile and education in the USSR "resonate profoundly with the journey many South Africans in our own liberation movement experienced".
Portugal's president Marcelo Rebelo de Sousa described him as a "decisive protagonist" in the relations with Angola's former colonial power.
Former Portuguese prime minister and ex-head of the European Commission Jose Manuel Barroso recalled a leader of exceptional intelligence, who was able "to guarantee Angolan national unity".
For much of his time at the head of his MPLA party, dos Santos fought a civil war.
The conflict was a Cold War hotspot, with dos Santos receiving Soviet and Cuban backing while UNITA rebels had Washington and apartheid South Africa on their side.
Namibia's president Hage Geingob called dos Santos an "outstanding revolutionary".
"Another giant tree has fallen," Geingob said.