German Chancellor Olaf Scholz this weekend makes his third visit to sub-Saharan Africa in two years, as conflicts elsewhere highlight the growing importance of an energy-rich region in which Berlin has traditionally had little involvement.
He will visit major energy producer Nigeria, as well as Ghana, with migration flows and instability in West Africa also on his agenda.
Much of the impetus for the trip has come from the realization that Germany - and Europe - need Africa more than it thought, said Greens legislator Anton Hofreiter.
"People realized we needed allies against Russia's invasion of Ukraine," he said. "And suddenly we noticed they weren't necessarily on our side... That was a rude awakening."
The war between Israel and Hamas has leant new urgency in particular to the energy aspect of the trip.
After Russia's invaded Ukraine in February 2022, Germany turned to Qatar for the liquefied gas it needs to fuel its industries. Potential disorder across the Middle East has provided a timely reminder of the importance of diversifying energy sources.
Oil is Nigeria's single largest export to Germany, and officials are considering adding gas to that mix.
"Oil-exporting countries face the question of whether they want to flare all that gas off or use it," a German official said in connection with the visit. "We are very open to discussing with Nigeria whether we can buy gas too."
But to make that happen, chronic underinvestment in Nigeria's energy sector would need to be looked at - something the as-yet unidentified business delegation accompanying Scholz may be able to help address.
They may also see Nigeria, with a population of 200 million, and Ghana, with 30 million, as sources of the labour that Germany badly needs as its own population increasingly ages out of the workforce.
"Especially in Ghana there are IT experts that German medium-sized companies are desperate to get hold of," said Stefan Liebing, a consultant and former head of the German African Business Association.
Some in Berlin hope that Germany, without France's baggage as the former colonial power in West Africa, will also be in a position to play a constructive political role in a region that has been marked by instability this year.
Last year, Germany returned several of the Benin Bronzes, sculptures from the Benin kingdom in modern-day Nigeria, a gesture seen as an attempt to win favour on a continent where anger at European colonial crimes still smoulders.
For Scholz, under pressure at home from critics who say that he is failing to get to grips with the scale of illegal migration, the trip will also be a chance to advance his argument that creating economic opportunities in the source countries is the best way of reducing migrant flows.
(Reuters - Reporting by Andreas Rinke, Sarah Marsh, Thomas Escritt and by MacDonald Dzirutwe in Lagos; editing by Deborah Kyvrikosaios and John Stonestreet)