DAKAR, Senegal (AP) — German Chancellor Olaf Scholz began a three-nation trip to Africa on Sunday, a visit that is expected to include talks with African leaders about the geopolitical consequences of the war in Ukraine.

Scholz is making stops in Senegal and South Africa as part of his first visit to the continent since becoming chancellor nearly six months ago.

Both countries have been invited to attend the G-7 summit in Germany at the end of June. Participants there will try to find a common position toward Russia, which was kicked out of the then-Group of Eight following its 2014 seizure of Crimea from Ukraine.

Leaders at the G-7 summit also will be addressing the threat of climate change. Several G-7 countries, including Germany and the United States, signed a ‘just energy transition partnership’ with South Africa last year to help the country wean itself off heavily polluting coal.

A similar agreement is in the works with Senegal, where Germany has supported the construction of a solar farm. Berlin is also interested in getting access to a large gas field currently being explored in the country.

German officials also said Scholz will make a stop in Niger, a country that like its neighbors has long been battling Islamic extremists.

Earlier this month, the German government backed a plan to move hundreds of its soldiers to Niger from neighboring Mali. The development comes amid a deepening political crisis in Mali that prompted former colonial power France to announce it was withdrawing its troops after nine years of helping Mali battle insurgents.

Germany officials say their decision also was motivated by concerns that Malian forces receiving EU training could cooperate with Russian mercenaries now operating in the country.

Germany, though, will increase its participation in a U.N. peacekeeping mission in Mali, providing up to 1,400 soldiers. The Cabinet’s decisions still need to be approved by parliament.

Niger is also a major transit hub for illegal migration to Europe. People from across West Africa connect with smugglers there to make the journey northward to attempt the dangerous trip across the Mediterranean Sea.