Luanda - Angola's new president, Joao Lourenco who will be sworn in on Tuesday, is a former general who spent several years in the political wilderness after angling for the top job in the 1990s.
Since then, Lourenco, 63, convinced key regime players he was the right man to succeed Jose Eduardo dos Santos, who has ruled the oil-rich southwest African nation for 38 years.
As the deputy president of the People's Movement for the Liberation of Angola (MPLA) - and defence minister until July - Lourenco is now "part of the inner circle of power", said Didier Peclard, an Angola specialist at the University of Geneva.
The MPLA won last month's election, carrying Lourenco to power as the party's presidential candidate.
It was something of a turnaround for a man whose ambition nearly ended his career in the 1990s when Dos Santos hinted he might stand down. Lourenco failed to hide his desire to succeed him.
Dos Santos, believing the former general was being opportunistic, forced Lourenco into several years of "political purgatory", according to Peclard.
His apparent flirtation with resignation had been merely "a political manoeuvre to bring those in the party with ambitions out of the woodwork, and Joao Lourenco paid the price," he said.
Following the recent election, Lourenco sharply criticised opposition parties who questioned the authenticity of his victory as he sought to smooth the path to his inauguration day.
"These political groups, by protesting in their sole interests against these so-called procedural irregularities, have violated electoral laws," he said earlier this month.
Joao Manuel Goncalves Lourenco was born on March 5, 1954, in Lobito, in western Angola.
As a young man, he fought against the then colonial power Portugal. After Angola won its independence in 1975, he fought in the civil war that erupted between the MPLA government and UNITA rebels.
Like Dos Santos, Lourenco studied in the former Soviet Union, which trained a number of rising young African leaders 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, Angola's largest, quickly rising through the MPLA hierarchy.
The ex-artillery general later led his party's group in parliament before becoming deputy speaker of the National Assembly.
His appointment as defence minister in 2014 secured his position as Dos Santos' favoured successor.
Now that he will be president, his main challenge may be Angola's shift to free-market capitalism at a time when volatile oil prices are taking a heavy toll on the crude-dependent economy.
"(Lourenco) has a reasonable reputation as a moderate, not an extreme character," said Soren Kirk Jensen of the Chatham House research group in London.
"He is probably the right person to be the bridge as Angola goes through a transition."
Rumours abound that Dos Santos had hoped to hand over the reins of power to one of his children, one of whom, Isabel dos Santos, is Africa's first woman billionaire according to Forbes magazine.
But Jensen said that "there is speculation that high-ranked people in the party put their foot down against this".
Opponents of the all-powerful regime believe Lourenco offers little hope for real change in Angola.
Activist and journalist Rafael Marques de Morais, a leading regime critic, said Lourenco was, at heart, "a hardline MPLA general".
Former political prisoner Nuno Alvaro Dala said that, under Lourenco, "power in Angola will continue to be militarised".
Lourenco is married to Ana Dias Lourenco, a former minister who also represented Angola at the World Bank. They have six children.