António Guterres, the new UN secretary general, said on Wednesday, in a clear response to the Trump administration’s refugee ban, that border policies based on religion, ethnicity or race were “against the fundamental principles and values on which our societies are based”.

US travel ban puts 20,000 refugees in 'precarious circumstances', UN says Read more

Guterres did not mention the US or Donald Trump in his written statement but he directly addressed the political, legal and moral debate triggered by the president’s executive order suspending entry for refugees and other visitors from a list of seven predominantly Muslim countries.

Guterres, who was formerly the UN high commissioner for refugees, also had implicit criticism for other western countries that have increasingly closed their doors to the vast numbers of refugees seeking safe haven around the world, and compared them unfavourably to poorer countries who host the overwhelming bulk of them.

The statement said Guterres was on his “way back from Ethiopia, the largest refugee-hosting country in Africa that for decades has been keeping its borders open to hundreds of thousands of refugees from its neighbours, many times in dramatic security situations”.

US travel ban - a brief guide The executive order signed by Donald Trump suspends the entire US refugee admissions system, already one of the most rigorous in the world, for 120 days. It also suspends the Syrian refugee program indefinitely, and bans entry to the US to people from seven majority-Muslim countries – Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen – for 90 days. The order has prompted a series of legal challenges, while thousands of Americans have protested outside airports and courthouses in solidarity with Muslims and migrants.

“Countries have the right, even the obligation, to responsibly manage their borders to avoid infiltration by members of terrorist organizations,” the secretary general said, but he added: “This cannot be based on any form of discrimination related to religion, ethnicity or nationality because … that is against the fundamental principles and values on which our societies are based.”

He added two other practical objections that have been at the core of much criticism of Trump’s executive order, on the grounds that it is poor national security policy. Guterres said such a ban “triggers widespread anxiety and anger that may facilitate the propaganda of the very terrorist organisations we all want to fight against” and that, furthermore, “blind measures, not based on solid intelligence, tend to be ineffective as they risk being bypassed by what are today sophisticated global terrorist movements”.

“This is not the way to best protect the US. or any other country in relation to the serious concerns that exist about possible terrorist infiltration,” Guterres told reporters in reference to Trump’s executive order. “I don’t think this is the effective way to do so. I think that these measures should be removed sooner rather than later.”

Ben Emmerson, the UN special rapporteur on counter-terrorism and human rights, said on Monday: “Trump’s executive order clearly breaches US international human rights obligations on non-refoulement and non-discrimination. It is unlawful.”

“Apart from being in breach of international law, Trump’s Executive Order carries a risk of increasing rather reducing the risk of terrorism,” Emmerson said on Twitter on Tuesday evening.

Reuters contributed to this report.