MANILA — Over the weekend, President Trump provoked an avalanche of criticism at home and abroad by extending a formal invitation to his Filipino counterpart, Rodrigo Duterte, to visit the White House. The two leaders are reported to have had a “very friendly conversation” by phone, prompting denunciations by human rights groups and the liberal establishment in both America and the Philippines.

To the chagrin even of administration officials, the White House, in a statement announcing the invitation, appeared not only to play down Mr. Duterte’s brutal crackdown on illegal drugs — which rights groups say has claimed 1,000 lives a month since it started last July — but also went so far as to praise his efforts to rid his country of drugs. (For his part, Mr. Duterte, after visiting Chinese warships in his hometown Davao City, said on Tuesday that he might be too “tied up” to go to Washington because of planned trips to Beijing and Moscow.)

Mr. Trump’s invitation to Mr. Duterte, however, is a sensible one when understood against a broader geopolitical backdrop. First of all, it was part of a package of invitations handed out to Southeast Asian leaders, including Prime Ministers Lee Hsien Loong of Singapore and Prayuth Chan-ocha of Thailand. In other words, Mr. Duterte wasn’t the only foreign leader invited.

Nor is this the first time that Mr. Trump has invited a controversial head of state. The Egyptian strongman Abdel Fattah el-Sisi has been a guest, and Mr. Trump is scheduled to welcome President Recep Tayyip Erdogan of Turkey in coming weeks. Both leaders have questionable human rights records.