WASHINGTON (Reuters) - U.S. President Donald Trump praised Philippine President Rodrigo Duterte in a phone call last month for doing an “unbelievable job on the drug problem,” according to a leaked Philippine transcript, despite human rights condemnation of Duterte’s drug crackdown.

Philippine President Rodrigo Duterte attends a welcoming ceremony upon his arrival at Vnukovo International Airport in Moscow, Russia, May 22, 2017. REUTERS/Maxim Shemetov

Trump commended Duterte’s actions in the same call in which the U.S. president invited him to Washington, according to a transcript of their conversation published by the Washington Post and the investigative news site The Intercept. The document included a “confidential” cover sheet from the Americas division of the Philippine Department of Foreign Affairs.

A senior U.S. official said the Trump administration did not dispute the accuracy of the transcript and declined further comment.

Duterte is accused by international human rights groups of supporting a campaign of extrajudicial killings of drug suspects in the Philippines, which his government denies.

Almost 9,000 people, many small-time drug users and dealers, have been killed in the Philippines since Duterte took office on June 30. Police say about one-third of the victims were shot by officers in self-defense during legitimate operations. Human rights groups say official accounts are implausible.

“I just wanted to congratulate you because I am hearing of the unbelievable job on the drug problem,” Trump told Duterte, according to the transcript.

“Many countries have the problem, we have a problem, but what a great job you are doing and I just wanted to call and tell you that.”

Duterte thanked Trump and said “this is the scourge of my nation now and I have to do something to preserve the Filipino nation.”

“I think we had a previous president who did not understand that,” Trump replied.

Duterte was infuriated by the Obama administration’s expressions of concern about extrajudicial killings after he took office and threatened to sever the long-standing U.S. defense alliance. Then-President Barack Obama canceled a meeting with Duterte last year after the Philippine leader insulted him.

Duterte won a May 2016 election by a huge margin and is often compared with Trump, having himself been the alternative candidate from outside mainstream politics.

Trump’s outreach to Duterte has been seen as another example of the affinity the U.S. president has shown for some foreign leaders with shaky human rights or autocratic reputations.

Human rights groups said at the time of the Trump’s White House invitation last month that it would be a mistake for Trump to host Duterte.

But a U.S. administration official insisted it was not a reward to Duterte or an endorsement of his policies but a decision that engagement with the Philippines was better than withdrawal which could “intensify bad behavior” by Duterte.

The Philippines foreign ministry said earlier in a statement it had no comment on news reports about the leaked transcript.

But it said that under Philippine law there was “criminal and civil liability attached to the hacking, unauthorized disclosure and use of illegally or inadvertently obtained confidential government documents”.

The ministry said it valued the need for transparency, but the release of some information could affect national security and regional stability. “As such, we appeal to the sense of responsibility and patriotism of all concerned,” it added.