Detaining migrants should be a last resort, the United Nations said on Friday, after US President Donald Trump unveiled a surprise plan to detain thousands of undocumented migrants in Guantanamo Bay.

On Wednesday, Trump said he had ordered the construction of a detention camp to hold up to 30,000 of what he called "criminal illegal aliens" at the notorious US military facility on the eastern tip of Cuba, used for holding terrorism suspects since the September 11, 2001 attacks on the United States.

"It is essential to uphold the dignity and rights of all individuals, regardless of their immigration status, and to ensure they are treated in accordance with international human rights standards," UN human rights office spokesman Jeremy Laurence told reporters in Geneva, when asked about the plans.

"Detention of migrants should be used as a last resort. And only in exceptional circumstances."

He added: "Regardless of their status, migrants have human rights and they should be respected, wherever."

Trump's plan intensifies the crackdown on illegal immigration that he has pledged in his second term.

"We have 30,000 beds in Guantanamo to detain the worst criminal illegal aliens threatening the American people," he said at the White House, adding that it would "double our capacity immediately" to hold undocumented migrants.

The Guantanamo Bay facility currently holds 15 detainees from the wars in Afghanistan, Iraq and other operations triggered by the September 11, 2001, attacks. At its peak, around 800 people were incarcerated there, drawing widespread condemnation from human rights campaigners.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.