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.