As if we needed Michael Cohen’s testimony for confirmation, it has been evident for a long time that President Trump neither knows nor cares much about Africa. That could end up costing African countries and the United States dearly.

By way of explaining why he considers Trump a racist, Cohen told the House Oversight Committee last Wednesday that the president once asked him whether he “could name a country run by a black person that isn’t a ‘shithole.’” Recall that Trump also applied the “shithole” label to African and Central American countries last January. Also recall that an ill-informed presidential tweet about its land policy last year angered South Africa, and that Trump once made Africans cringe by misidentifying the country of Namibia.

First Lady Melania Trump did make a high-profile visit to Africa last fall, drawing attention to — among other things — U.S. humanitarian efforts. Yet Congress has had to bat back White House proposals to slash funding for humanitarian assistance provided through the Agency for International Development, much of which would go to Africa. Other Trump policies, such as his approach to climate change, are not directly aimed at Africa, but will hurt many Africans.

It took nearly two years — until mid-December — for the Trump administration to announce its policy priorities for Africa, which appear to be largely about countering China and Russia. In some ways, that just takes us back to the future. During the Cold War, big-power competition played a large role in U.S. Africa policy. But power politics usually was leavened with a reasonable dose of humanitarian and developmental assistance, and efforts to build civil society.

Article continues after advertisement

This time, the competition includes players such as India and China. Beijing in particular is making a big play in Africa.

As Bill Gates loves to tell people, Africa is making strides. (The Gates Foundation is deeply involved on the continent.) Some of the fastest-growing economies are in Africa, and the population is young: In 30 years’ time, Africans will make up an estimated one quarter of the global workforce. So a forward-looking policy — even if it puts self-interest first — would lock in relationships and ways of doing business intended to hold up over the long haul.

That’s exactly what’s being done. By China.

Grant T. Harris, who served in the Obama White House as senior director for African Affairs, says the Trump administration is right to be concerned about Chinese influence. He cites a survey indicating there are now 10,000 Chinese companies doing business in Africa. China surpassed the United States as Africa’s leading trading partner a decade ago,and China is selling weapons and building a military base in Djibouti close to a large U.S. base. It also is investing heavily in soft power, including exchanges with political parties. It hosts more African students than U.S. universities do.

Among China’s oft-criticized strategies is to offer big loans on murky terms that give it leverage over African governments. But Harris says China also provides capital and infrastructure. Instead of approaching Africa primarily as a venue for big-power competition, he says, the U.S. needs to offer a better alternative. That means focusing on development and humanitarian aid, but also promoting democracy and human rights. China has never prioritized either — and at home is sliding backwards on both fronts.

A Pew Research Center survey last year asked people in 25 countries — including Nigeria, Kenya and South Africa — whether the world was better off with China or the United States as its leading power. All three chose the United States (although South Africa quite narrowly), and majorities in each had a positive view of the United States.

In 2013, three-quarters of Africans surveyed said democracy was the best form of government. Since then, the figure has slid. And democracy is struggling. In a story in Foreign Affairs, Nic Cheeseman and Jeffrey Smith cited a handful of troubling statistics: One measure of the level of democracy has decreased each of the last 14 years; just 40 percent of those in another survey said their last elections were free and fair.

The model gaining ground will look familiar: More African leaders are seeking to abolish term limits, which would in effect allow them to rule for life (Chinese President Xi Jinping did the same thing last year). In order to fight “fake news,” others have shut down political opposition and restricted freedom of speech. While that’s happening well beyond Africa, too, the continent’s democracies are among the world’s most fragile.

European countries, including former colonial powers such as France and Britain, will speak up for democracy. But many are in turmoil themselves, and none has Washington’s clout. Even when the U.S. works to encourage civil society in Africa, the task can be daunting. But the Trump administration largely ignores democracy and human rights in its foreign policy. And by its actions, it has become part of the problem.

Article continues after advertisement

Even though Africa is almost never at the top of Washington’s agenda, there still is a well of goodwill across much of the continent. It can easily be squandered. African countries also can develop into a significant force in the global economy while being closely tied to China. And China has shown that they can grow while dispensing with the niceties of democracy and human rights. That would be a big loss for Africans, and for the United States.