US President Donald Trump was aware of the criticism Philippine counterpart Rodrigo Duterte had received over his controversial war on drugs, but praised him for doing a “great job” when they spoke, Duterte's spokesman said on Tuesday.

Trump's invitation to the Philippine leader to visit him at the White House unleashed a storm of criticism in Washington due to the scale of the bloodshed of Duterte's anti-drugs campaign, which has killed thousands of people over the past 10 months.

The White House defended the invitation made during a phone call on Saturday, acknowledging that though human rights were an important issue, Washington needed allies in Asia to address the global threat of North Korea's development of nuclear weapons.

Duterte's spokesman, Ernesto Abella, said Trump was very much aware of the criticism of Duterte, but had praised him for “doing a great job considering the weight and the enormity of the conditions in the Philippines”.

It was not clear if Abella was quoting Trump as praising the anti-drugs campaign specifically, or Duterte's performance as president in general.

“I'm sure he's aware of all these considerations,” Abella added, referring to Trump.

“However, from his point of view, it seems like the president of the Philippines is doing a sensible job.”

Duterte has received widespread condemnation in the West for failure to curtail the killings and address activists' allegations of systematic, state-sponsored murders by police of drug users and dealers, which the authorities reject.

Duterte has also received praise, however, for his handling of one of the world's fastest-growing economies, and a policy agenda geared towards supporting farmers and small businesses, developing infrastructure and fighting poverty in a country where a fifth of the people live on less than $1 a day.

But critics said Trump had gone a step too far with an invitation that was tantamount to an endorsement of Duterte's bloody approach to law and order.

Duterte is also known for his foul language in lambasting the United States on a near-daily basis for what he calls a history of hypocrisy. He last week called the New York Times “assholes” for its coverage of his anti-drugs campaign.

Ben Cardin, a ranking member of the foreign relations committee of the US Senate, said he was “deeply disturbed” by the invitation, and said he would this week introduce bipartisan legislation to send a warning to Duterte, which would include a ban on arms sales to the Philippine police.

“This is a man who has boasted publicly about killing his own citizens,” Cardin said in a statement.

The most controversial quotes from Rodrigo Duterte Show all 9 1 /9 The most controversial quotes from Rodrigo Duterte The most controversial quotes from Rodrigo Duterte On killing drug addicts “These sons of whores are destroying our children. I warn you, don’t go into that, even if you’re a policeman, because I will really kill you. If you know of any addicts, go ahead and kill them yourself as getting their parents to do it would be too painful” The most controversial quotes from Rodrigo Duterte Message to China “I will go there on my own with a Jet Ski, bringing along with me a [Phillipino] flag and a pole, and once I disembark, I will plant the flag on the runway and tell the Chinese authorities, ‘Kill me’ ” AP The most controversial quotes from Rodrigo Duterte Christmas message to law-breakers “If you do not want to stop, and just continue committing crimes, then this would be your last Merry Christmas” AP The most controversial quotes from Rodrigo Duterte On sex life “I was separated from my wife. I’m not impotent. What am I supposed to do? Let this hang forever? When I take Viagra, it stands up” AFP/Getty Images The most controversial quotes from Rodrigo Duterte On the drugs trade “None of my children are into illegal drugs. But my order is, even if it is a member of my family, ‘kill him'" AP The most controversial quotes from Rodrigo Duterte Insulting the Pope “We were affected by the traffic. It took us five hours. I asked why, they said it was closed. I asked who is coming. They answered, the pope. I wanted to call him: ‘Pope, son of a wh**e, go home. Do not visit us again’” AFP/Getty Images The most controversial quotes from Rodrigo Duterte Joke about rape “I saw her face and I thought, 'What a pity... they raped her, they all lined up. I was mad she was raped but she was so beautiful. I thought, the mayor should have been first” AFP/Getty The most controversial quotes from Rodrigo Duterte Insulting Barack Obama "Mr Obama should be respectful and refrain from throwing questions at me about the killings, or son of a bitch, I will swear at you in that forum" REUTERS The most controversial quotes from Rodrigo Duterte On Abu Sayyaf Islamic militants "If I have to face them, you know I can eat humans. I will really open up your body. Just give me vinegar and salt, and I will eat you. If you annoy me to the fullest... I will eat you alive. Raw" EPA

“Ignoring human rights will not advance US interests in the Philippines or any place else. Just the opposite.”

Abella also reiterated that Duterte had acknowledged Trump's invitation, but had not accepted it.

Although Trump gave no timeframe for the invitation, Duterte on Monday told reporters he could not commit because he might be “tied up” with other overseas trips.