After a Monday meeting at the White House with Nigerian President Muhammadu Buhari, President Obama is now traveling to Kenya and Ethiopia. The trip is on the radar of human rights and media freedom organizations because of documented abuses in each country. And in an open letter, DFL Sens. Al Franken and Amy Klobuchar, DFL Reps. Keith Ellison, Tim Walz and Betty McCollum, and Republican Rep. Tom Emmer called on the president to prioritize human rights during his trip.

That focus is warranted. Buhari, who briefly led Nigeria as a military dictator in the 1980s, was elected democratically this time, in part because of his predecessor’s feckless fight against Boko Haram, the nihilist Nigerian group aligned with the Islamic State in Iraq and the Levant (ISIL). While U.S. policy rightly prohibited Nigeria from some materiel because of its human rights record, Buhari has signaled he is committed to improvement, which might mean more coordination in the fight against Boko Haram.

In Kenya, President Uhuru Kenyatta was charged with crimes against humanity for orchestrating ethnic violence (the case was dropped in December). And Ethiopian Prime Minister Hailemariam Desalegn’s governing alliance, which has a poor human rights record, just won every single seat in Parliament.

Obama should show that outreach isn’t condonation and that personal diplomacy creates opportunities to convince these and other African leaders that upholding human rights is a moral and strategic necessity.

This does not mean that Obama shouldn’t emphasize security. After all, there is no worse offender of human rights than Boko Haram, which also threatens Chad and Cameroon, and Al-Shabab, the terrorist group that has killed scores in Kenya, Ethiopia and especially Somalia.

Obama also must stress that honoring human rights lends legitimacy in the fight against extremism. So does development. Obama has rightly focused on this key component of foreign policy with multiple programs. But the U.S. is not alone, and China in particular has gained a Pan-African foothold by investing in numerous initiatives. To be sure, mercantile interests should never supersede human rights objectives. Nor can the two be divorced. Balancing these dynamics will be among Obama’s challenges not just regarding Nigeria, Kenya and Ethiopia, but throughout the challenged continent.

America has long engaged disreputable democracies and even totalitarian states when it is in the interest of national security. Nigeria, Ethiopia and Kenya are allies in the fight against extremism, so Obama is right to work with their leaders. But he should prioritize human rights.

“Presidential visits aren’t patronizing pats on the head for good conduct,” said J. Peter Pham, director of the Africa Center at the Atlantic Council. Presidential visits are meant to engage countries that are strategically important, not just on economic, political and security issues, but on issues of values which are part of our foreign policy. But you can’t engage without talking to them.”