A senior military officer who became a graft buster and turned on his political patron upon seizing power, Angolan President Joao Lourenco has won a second term, but the victory was not a walk in the park.
The 68-year-old secured a new mandate in the tightest vote held in the oil-rich country on August 24.
Lourenco leads the People's Movement for the Liberation of Angola (MPLA) party, which has ruled the country for nearly half a century after sweeping to power in 1975.
His victory was officially confirmed 24 hours after he buried his predecessor, the country's long-time ruler Jose Eduardo dos Santos, who died in Spain last month after an illness.
Handpicked by dos Santos, Lourenco took over in 2017. That year his party won with a comfortable 61 percent of the votes. This time he swung back to office with just 51 percent.
PAY ATTENTION: Follow us on Instagram - get the most important news directly in your favourite app!
He had promised sweeping reforms and a crackdown on corruption.
But as the results showed, support for the Soviet-educated former general has faded as the oil-rich country grapples with soaring poverty, inflation, drought and unemployment.
Lourenco "promised more transparency, less corruption and inclusive governance", said Borges Nhamirre, a consultant at the Institute for Security Studies, a Pretoria-based think tank.
"Now his governance is seen as authoritarian."
Joao Manuel Goncalves Lourenco was born in 1954 in Lobito, in western Angola.
As a young man, he fought against the then colonial power Portugal. Then, after Angola won its independence in 1975, he fought in the civil war that erupted between the MPLA government and UNITA rebels.
Lourenco studied in the former Soviet Union, which trained many rising young African nationalists during decolonisation.
He became political chief of the armed wing of the MPLA in the civil war -- a Cold War proxy conflict that drew in Cuban forces to fight alongside the MPLA, while CIA-backed militias did battle against them.
In 1984, he was appointed governor of the eastern province of Moxico.
The ex-artillery general quickly rose through the MPLA hierarchy, leading the party's group in parliament before becoming deputy speaker.
Yet his ambition almost ended his career. Unable to hide his angling for the top job, he was sidelined by dos Santos around the turn of the millennium.
After years in the political wilderness, he was brought back from the cold and appointed defence minister in 2014. Two years later, he was designated for the country's top job.
After winning the 2017 elections, Lourenco quickly turned on his predecessor, starting an anti-corruption drive to recoup the billions allegedly embezzled by dos Santos' family.
Having inherited an oil-dependent economy deep in recession, he also launched an ambitious reform plan to differentiate revenue streams and privatise state-owned firms.
While he has made much of his successes so far, many of Angola's 33 million people still struggle to put food on the table. They face soaring inflation and the worst drought in 40 years.
Some have also come to see Lourenco's anti-graft push as selective and politically motivated, which has fuelled divisions within the ruling party.
Dos Santos's death in Spain in July added to the president's woes, triggering a public spat with the veteran revolutionary leader's children -- several of whom face an array of corruption investigations.
Between national voting and the vote tallying, Lourenco's government buried Dos Santos on what would have been his 80th birthday. Some of his children, including the oldest daughter and businesswoman Isabel dos Santos, stayed away.
The change in tack from the previous regime has won praise abroad, where the Lourenco's standing remains good.
Lourenco has become the go-to mediator in Africa's Great Lakes region, whether tackling crisis in the Central Africa Republic, or brokering talks between the Democratic Republic of Congo and Rwanda.
Back home, he promised to open dialogue with various sections of society after the tight vote.
He is married to Ana Dias, a former planning minister who also represented Angola at the World Bank. They have six children.