UN Secretary-General Antonio Guterres says US President Donald Trump's travel restrictions on people with passports from seven countries and a freeze on refugee resettlement was "not the best way to protect the US" and should be lifted sooner than later.
Guterres' comments were his first to directly address Trump's signing of an executive order last Friday on immigration amid a drumbeat of criticism from around the world and protests.
The order put a 120-day halt on the US refugee program, barred Syrian refugees indefinitely and imposed a 90-day suspension on people from seven predominantly Muslim countries - Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen.
The White House has described the order as necessary "to protect the American people from terrorist attacks by foreign nationals admitted to the United States".
But Guterres told reporters on Wednesday that "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.
"I think that these measures should be removed sooner rather than later," said Guterres, who has issued a series of comments since Friday about the importance of protecting refugees and the dangers of broad-based travel bans.
Guterres said travel bans risked playing to the advantage of terrorist organisations seeking to recruit members.
"If a global terrorist organisation will try to attack any country like the United States, they will probably not come with people with passports from those countries that are hot spots of conflict today," he said.
He said such groups were likely to use people for attacks travelling on the passports of "developed and credible countries," or who had been living in the United States or other countries for decades.
A panel of UN human rights experts urged the Trump administration on Wednesday to protect people fleeing war and persecution, and said the executive order contravened international humanitarian and human rights laws.
Critics of the order inside the United States have described it as unconstitutional and several states have sued to challenge the travel ban.