Those were President Obama’s words when he addressed Ghana’s parliament in July 2009, during his first trip to sub-Saharan Africa as president. The historic speech, watched around the globe, was an optimistic clarion call to the leaders on the continent from the son of a Kenyan. “First, we must support strong and sustainable democratic governments,” Mr. Obama said.

The president seems to have forgotten that speech. Last week, the White House announced that, while traveling to Kenya next month, Mr. Obama also will stop in Ethiopia, the first such visit by a sitting U.S. president to the country of 94 million. It’s almost unfathomable that he would make time for an entrenched human rights abuser such as Ethi­o­pia while cold-shouldering the nation that just witnessed a historic, peaceful, democratic change of power: Nigeria.

Administration officials justify the trip by citing the United States’ long-standing cooperation with Ethi­o­pia on issues of regional security and the country’s accelerating economic growth. Ethi­o­pia is a major recipient of U.S. development assistance, and the African Union has its headquarters there. But it also stands out in Africa for its increasingly harsh repression and its escalating chokehold on independent media and political dissent. Since June 2014, 34 journalists have been forced to flee the country, according to the Committee to Protect Journalists. Ethi­o­pia is also one of the world’s leading jailers of journalists.

The administration already undermined Ethiopia’s struggling journalists and democracy advocates in April, when Undersecretary of State Wendy Sherman said Ethi­o­pia has “moved forward in strengthening its democracy. Every time there is an election, it gets better and better.” Shortly after her statement, the ruling party held an election in which it secured 100 percent of the parliamentary seats. That was indeed an improvement upon its 2010 performance, when it won 99.6 percent of seats. In the months ahead of the May 24 polls, opposition party members and leaders were harassed and arrested. The Ethiopian government refused to allow independent election observers, except from the African Union. Since the election, two opposition members and one candidate have been murdered. The government has denied any responsibility for the killings.

Meanwhile, Nigeria, the continent’s most populous nation and the one with the largest economy, overcame risks of electoral violence and Boko Haram’s terrorism to manage a peaceful transfer of power for the first time since the country’s return to democracy in 1999. With numerous African countries facing elections in the next two years, a visit to Nigeria would have signaled U.S. commitment to partnering with governments that respect freedom, the rule of law and the will of their people. Snubbing Nigeria for a trip to Ethi­o­pia sends the opposite message, in essence validat ing Ethiopia’s sham elections and rewarding a regime that has shown no intent to reform. Six years after his idealistic speech in Ghana, Mr. Obama is sending a message to Africa that democracy isn’t all that important after all.