To see the new trajectory, you need look only at German politicians’ itineraries in the past year. The defense minister, Boris Pistorius, spent a week last month in Asia, with stops in Singapore, Indonesia and India. India has been a particular focus: Prime Minister Narendra Modi was one of the first world leaders to be hosted by Mr. Scholz, and they’ve since met frequently. Along with the foreign minister, Annalena Baerbock, Mr. Scholz has also spent considerable time in Africa. In a wide-ranging visit to the continent in May last year, he discussed — among other things — a gas deal with Senegal.

The German delegations, for the most part, have been warmly welcomed. Yet not everything is rosy. Countries like India don’t have the same view of the war and are reluctant to join the Western alliance supporting Ukraine, fearing the economic toll of alienating Russia. But sensitivity to historic injustices is just as much part of their reasoning. In many of the countries Germany hopes to woo, postcolonial resentment runs deep. And Germany, for all its overtures, is seen as part of the colonizing West.

That has been a bit of a shock. Germany simply does not perceive itself as a former colonial power. It’s true that compared with the British, French, Spanish and Dutch Empires, Germany’s started later and was smaller in scope. But the German Empire occupied vast lands mostly in the southwest and east of Africa, as well as in the Pacific. It was in one of its colonies that it committed the first officially recognized genocide, of the Herero and Nama people.

It took place in today’s Namibia from 1904 to 1908. German colonial authorities forced insurrectionists — including women and children — into the desert, where many died of starvation and dehydration. Others were detained in concentration camps under catastrophic conditions. Altogether, tens of thousands were murdered. It wasn’t until 2021 that Germany recognized the murder as genocide, offered an apology to Namibia and agreed to pay $1.35 billion in aid.

This chapter of German history gets little public attention. At school in Germany, children learn about the Holocaust from an early age, and rightly so. But they can still easily graduate without ever having heard of the genocide of the Herero and Nama or the brutal clampdown on the Maji Maji insurrection in a German colony called East Africa, which stretched over parts of today’s Tanzania, Rwanda and Burundi. Colonialism neither features as part of the national narrative nor informs foreign policy.