Angola's former strongman president Jose Eduardo dos Santos, whose nearly four-decade rule of the oil-rich nation was marred by allegations of plunder and nepotism was laid to rest amid a family row.
The funeral, which was disputed by some of his children, was held at the historic palm tree lined Praca da Republica in the seaside capital Luanda on what would have been dos Santos's 80th birthday.
It comes days after his party, the People's Movement for the Liberation of Angola (MPLA) -- which has ruled the country for nearly half a century -- saw its worst results at the polls in the most hotly contested elections since independence.
Dos Santos -- who died last month following a cardiac arrest -- will be remembered as a "statesman and devoted pan-Africanist," Namibia's ex-president Sam Nujoma, 93, told the hundreds of mourners in attendance.
A choir sang dirges while flags flew at half-mast around the square, which houses an imposing concrete mausoleum where the country's founding president Agostinho Neto is interred.
Dignitaries including South Africa's President Cyril Ramaphosa, the Democratic Republic of Congo's President Felix Tshisekedi and Portugal's President Marcelo Rebelo de Sousa filled rows of white and gold seats.
Josiane dos Santos, the late leader's daughter, sobbed while recalling her father's love for music.
During Angola's war for independence, the young "Zedu", as he was called, began his career as a revolutionary by recording LPs that encouraged the fight against coloniser Portugal while he took refuge in the neighbouring DRC, she said.
A representative of his foundation collapsed in the middle of his eulogy.
A 21-gun salute rang as a portrait of dos Santos was carried ahead of the coffin, supported by military-clad pallbearers, in a slow procession to the mausoleum where he was laid to rest.
- 'Architect of peace' -
Dos Santos was referred to by many, particularly MPLA members, as the "architect of peace" who brought democracy and multiparty politics to the country.
On the streets of Luanda, some people were more critical of his legacy.
"He left a high rate of youth unemployment, extreme poverty and one of the most unequal societies," said Mariana Quissanga, 42, a furniture and clothes businesswoman.
Dos Santos led the country from 1979 to 2017 under the MPLA banner -- which saw its worst performance in this week's election.
After 97 percent of the results were tallied, an initial count showed the MPLA had won 51.07 percent of the vote, with 44.05 percent for the party's main rival, the National Union for the Total Independence of Angola (UNITA).
UNITA -- which fought a bitter 27-year civil war against the MPLA government -- has rejected the results.
Five members of the election commission have threatened not to sign off the results.
Despite political differences, UNITA leader Adalberto Costa Junior attended Sunday's funeral.
"We have already lodged complaints with the electoral commission on where we believe the results do not match our count," he told reporters on the sidelines of the service.
Dos Santos died at a Barcelona clinic, and some of his children were at loggerheads with the government and his estranged wife over where and when he was to be buried.
But a Spanish court ruled that the body be returned to Angola.
His eldest daughter Isabel dos Santos, who has faced a slew of investigations into her multinational business dealings, did not attend the funeral.
Instead, as the ceremony was under way, Isabel posted a picture of herself and her father on Instagram, captioned in Portuguese "Happy birthday papa".
His other daughter Tchize also wished him a happy birthday on Instagram in a post showing herself on a yacht, while criticising the choice of a Sunday and his birthday to hold the funeral.
Under dos Santos, Angola became one of Africa's top oil producers. While he and his family reaped vast wealth from Angola's resources, most of the country's 33 million people remain among the poorest in the world.
He stepped down in 2017, appointing Joao Lourenco as his successor, who now stands to gain a second term in office.
Dos Santos passed a series of laws before his departure from government, granting himself broad judicial immunity.
Senegal: Loved ones mourn student killed during unrest
Go to video
13 lives lost from toxic porridge consumption in Namibia
Tina Turner: an extraordinary legacy
Tina Turner dies at 83
Go to video
Ten dead, 37 critically ill in SA cholera outbreak
Tunisian authorities say deadly synagogue attack in Djerba premeditated