MANILA — President Rodrigo Duterte of the Philippines threatened on Thursday to expel the ambassadors representing the European Union, suggesting that he would give them 24 hours to leave his country.

“You think that we are a bunch of morons here,” Mr. Duterte said in an expletive-laden speech at the presidential palace. “Because we can have the diplomatic channel cut tomorrow. You leave my country in 24 hours. All. All of you.”

His remarks appeared to be a reaction to recent criticism of the country’s war on drugs, in which thousands of people have been killed by the police.

A director of Human Rights Watch suggested that the Philippines should be removed from the United Nations’ top human rights body. A group including European lawmakers issued a statement after a visit to the country last week suggesting that the European Union might tighten its terms of trade with the Philippines for human rights reasons.