Joao Lourenco has a huge challenge ahead, as he becomes Angola's first new president in 38 years.
The ruling People's Movement for the Liberation of Angola (MPLA) has won a huge majority in parliament following the 23 August election, according to official results, meaning he will succeed Jose Eduardo Dos Santos.
Under Mr Dos Santos, there was one golden rule for anyone who wanted to survive politically in Angola: Do not make your ambitions known.
President Dos Santos remained in charge by making sure that any potential challenger was quickly sidelined.
Joao Lourenco, 63, known as JLo, who was born to a family involved in anti-colonial politics, learnt that lesson the hard way.
In 1998, the liberation war veteran and Angolan Armed Forces general was elected MPLA secretary-general - a sign that his political fortunes were on the rise.
Three years later, when President Dos Santos hinted that he might be ready to resign the presidency, Mr Lourenco made known his interest in the top job.
But the MPLA victory, early in 2002, in a 27-year civil war against the National Union for the Total Independence of Angola (Unita), served to relaunch Mr Dos Santos' presidency, and any talk of retirement was soon forgotten.
The following year at the 2003 MPLA party congress, Mr Lourenco was demoted.
In 2012, as Mr Dos Santos approached 70, the succession issue became more pressing.
When the president elevated his cousin, Manuel Vicente, to become vice-president, some foreign observers saw this as the anointing of Mr Vicente as a successor.
However, Mr Lourenco, would have known better - that the MPLA would never endorse a political outsider like Mr Vicente as president, and that a man with no military pedigree was a risky choice in a country where the security forces lurk in the shadows of politics.
Mr Lourenco, on the other hand, could be confident that he himself had both the party and the military credentials, and that this was enough to earn forgiveness for his lack of caution a decade earlier.
Sure enough, his appointment as defence minister in 2014 signalled his rehabilitation.
And his election in 2016 as MPLA party vice-president left no doubt that he would succeed the by now ailing Mr Dos Santos.
But Mr Dos Santos's long-held suspicion of potential rivals has made it nearly impossible for Mr Lourenco, or anyone else, to show initiative or cultivate a following.
This makes it difficult to know what to expect from the next president of one of Africa's biggest oil producers.
Who is Joao Lourenco?
- Active in MPLA struggle against Portuguese colonial rule as a teenager.
- Part of first group of guerrillas to enter Angolan territory from Congo-Brazzaville
- Received military training and studied history from 1978 to 1982 in the former Soviet Union
- General in the Angolan Armed Forces in post-independence civil war
- Defence minister since 2014
- Said to be one of the few Angolan generals and politicians free of allegations of involvement in major corruption scandals
- Married to Ana Dias de Lourenco, a former World Bank official, who has held several positions in government as minister. They have six children
- Small white dog appears in his Facebook photos
While Mr Lourenco is only 12 years younger than President Dos Santos, he has been forced in the past few months to reinvent himself as a bringer of generational change.
The man born in 1954, schooled in the military and in the mysteries of the political culture of the old MPLA, has suddenly discovered social media.
He rarely looks entirely comfortable in his Facebook photos, even when relaxing at home with his wife, the former government minister and World Bank official Ana Dias Lourenco.
Although not naturally charismatic, Mr Lourenco's down-to-earth image is in sharp contrast to the affected manners of the equally uncharismatic Mr Dos Santos.
After the MPLA's final election rally, Mr Lourenco was filmed walking among the crowd, and showing young voters how to make their cross on a sample ballot paper.
Although the incident was choreographed for the TV cameras, Mr Lourenco displayed more of a common touch in one minute than his predecessor had managed in decades.
He looks set to take control of a state in which President Dos Santos' relatives and loyalists remain in key positions and Mr Dos Santos himself remains in the kingmaker role as MPLA chairman.
Mr Lourenco will, however, have the support of those who see the corruption of the Mr Dos Santos regime as a liability to the party's future.
The MPLA is under unprecedented pressure. During the post-2003 oil boom, the government did little to diversify the economy away from its reliance on oil.
Consequently the slump in the oil price since 2014 has led to a foreign currency squeeze, job losses and soaring food prices in a country where most people were already struggling to make ends meet.
Once he takes over as president, Mr Lourenco needs to consolidate an independent support base within the MPLA.
And the sooner Mr Dos Santos quits as party leader, the better for Mr Lourenco.
In the end, the health of Angola's long-time leader, who has been undergoing cancer treatment for at least a year, could prove crucial.