Funeral workers use a stretcher to carry the body of a suspected drug pusher.Romeo Ranoco / Reuters

President Donald Trump spoke on the phone Saturday with the president of the Philippines, Rodrigo Duterte, and after discussing North Korea and the Association of Southeast Asian Nations, Trump invited Duterte, who has overseen a crackdown on drugs in his country that’s led to thousands of extrajudicial killings, to visit the White House.

A statement from the White House released late Saturday said Trump enjoyed the conversation, which it described as “very friendly.” In their talk, Trump acknowledged the Philippines government was fighting “very hard to rid its country of drugs, a scourge that affects many countries throughout the world.” He said he looks forward to his own visit to the Philippines in November, and that the two countries were “now heading in a very positive direction.”

It is a remarkable turnaround for Duterte, who called former President Obama a “son of a whore.” Since he became president last summer, Duterte has made a habit of cursing world leaders, even the pope. But he seems to have a soft spot for Trump, whom he has compared to himself, and called a “realistic and a pragmatic thinker.” He wasn’t the first to compare the two politicians; both have been called populists with a penchant for making bold, controversial (and in Duterte’s case, crass) statements that they must later walk back. Both men also claim to speak for the common man, and in the Philippines Duterte enjoyed strong support as the candidate who would replace the rule of law by cracking down on drug traffickers.

For about two decades as mayor of Davao, a large city in the country’s south, Duterte had promised a crackdown on crime and delivered. But he was accused of allowing extrajudicial death squads to roam the city and kill freely. Most often the victims were poor drug-users and low-level criminals. Duterte was even accused of directing these groups, especially one called the Davao Death Squad. One former police officer, Arturo Lascanas, has widely admitted to taking part in the killings, and said the group was organized within the police department.

Even in his stump speeches and with the media, Duterte has bragged about his work in Davao, and once admitted to personally killing three kidnappers without trial. "In Davao, I used to do it personally,” he’s said of such acts. “Just to show the guys that if I can do it, why can’t you?"

As of April, Philippines police had killed 2,500 people, and vigilantes had killed 3,600. Like in Davao, many of the victims are the country’s poorest residents, living in slums where drug use is common. And contrary to what police say, local media often report the dead seem to have no ties to drug syndicates other than being addicts. The European Union has condemned the extrajudicial killings, to which Duterte responded by cursing the group.

Trump’s willingness to overlook such killings and humanitarian violations might lie in what he believes the Philippines can offer. The Philippines was once a U.S. territory, and the two countries have remained close ever since. But under Duterte they have drifted. Duterte is interested in making the Philippines strong and independent, and after the Obama administration became increasingly critical of his presidency, Duterte visited China. China and the Philippines have a tense relationship because of competing claims over the South China Sea, and because the Philippines hosts a U.S. military base. In his one visit, Duterte brought back $24 billion in funding deals from China. The meeting with China made real the possibility the U.S. could lose a longtime ally in the area. Trump has also shown that humanitarian violations under foreign leaders won’t dissuade him from dealing with them, or even from praising them.

Earlier this month, Trump complimented Chinese President Xi Jinping, who has curtailed free speech and locked up political dissidents. A week ago, Trump called to congratulate Turkish President Recep Tayyip Erdogan on his victory in a vote seen by much of the international community as lending him near-dictatorial powers. Erdogan has also ousted, suspended, or arrested more than 50,000 people since a failed coup to remove him from power last year. On Saturday, Erdogan’s government blocked access to Wikipedia.

Trump’s apparent friendliness with Duterte may mean he is willing to look past humanitarian violations in order to further long-term U.S. interests. In this he would not be alone. It may also be that Trump cares little for claims that a leader has encouraged the murder of thousands, even bragged about killing a few himself.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.