The body of Angola's Jose Eduardo dos Santos, who died in Spain last month, was to arrive in Luanda Saturday, government said, ending a weeks-long feud over the repatriation of the ex-president's corpse.

A lawyer for dos Santos' widow confirmed that the remains, which have been at the centre of a family dispute, had left Barcelona and were on their way to the Angolan capital.

"On Friday, we made all the preparations, the customs papers, the embalming, we did everything and, indeed, this morning the body is flying to Angola," Josep Riba Ciurana, a lawyer for the widow, Ana Paula dos Santos, told AFP.

Dos Santos, who ruled the oil-rich African nation with an iron first from 1979 to 2017, died in Barcelona on July 8 at the age of 79 after suffering a cardiac arrest.

Since then, the question of when and where he will be buried has pitted the Angolan government and his widow against some of his adult children.

A Barcelona court this week ordered his remains be delivered to Paula and granted authorisation for "the repatriation and international transfer of (his) remains to Angola".

Dos Santos' 44-year-old daughter Tchize dos Santos filed an appeal to challenge the decision, but Riba Ciurana said a judge granted immediate execution of the ruling, allowing the body to leave Spain.

"We are the first to be surprised," said Tchize's lawyer, Carmen Varela, adding they learnt about the repatriation from television and had not been "notified of anything".

Varela explained they wanted to hold the funeral in Barcelona because returning to Angola is not an option for some members of the family.

Several of dos Santos' children have faced an array of corruption investigations in recent years.

The body was due to arrive in Luanda in the late afternoon, a government official told AFP without providing further details.

The announcement comes just a few days before Angolans are due to head to the polls in a national vote, and marks a small victory for President Joao Lourenco.

Lourenco was addressing a large crowd of supporters at a campaign rally in Luanda as news broke.

In an Instagram post, Tchize accused the president of using her father's corpse as a campaigning tool, describing this as a "world shame".

The nearly four-decade tenure of dos Santos saw members of his family capitalise on the nation's oil riches while most Angolans remained mired in poverty.

When he stepped down in 2017, dos Santos handed over power to Lourenco, the former defence minister.

But Lourenco quickly turned on his erstwhile patron, unleashing an anti-corruption drive to recoup billions he suspected had been embezzled under dos Santos, a campaign that has targeted the former president's family.

"You took me to the altar and... I will not be able to take you to your last (resting) place," Dos Santos' eldest daughter Isabel, who has faced a slew of investigations into her multinational business dealings, wrote in an Instagram post.

"They ripped you out of my arms."