Donald Trump’s ban on refugees entering America has caused chaos, confusion and anger across the globe, as people were turned back from US-bound flights and others were detained on arrival at American airports.

Up to 12 people were being held at New York's JFK Airport, two of them Iraqis who had worked for the US in Iraq and had been targeted for doing so. As lawyers filed a lawsuit demanding their release, passengers at various airports, including places such as Cairo, were turned back. KLM announced it had refused carriage to the US to seven passengers from predominately Muslim countries.

Mr Trump denied that his executive order amount to a Muslim ban, but he said: "This is working out very nicely."

On Friday, Mr Trump signed a four-month hold on allowing refugees into the United States and temporarily barred travellers from Syria and six other Muslim-majority countries. He claimed the moves would protect Americans from terrorism. “We want to ensure that we are not admitting into our country the very threats our soldiers are fighting overseas,” he said in a ceremony at the Pentagon, where he also signed an order to boost the US military.

The enforcement of the order sparked outcry, not just in the US, but around the world, where travellers to the US were immediately confronted with uncertainty and doubt. Mr Trump had spoken during the election campaign of his intention to heighten screening of refugees, but refugees from the seven countries affected already face intense vetting that can last up to five years.

“This is a stupid, terrible decision which will hurt the American people more than us or anybody else, because it shows that this President can’t manage people, politics or global relationships,” Najeed Haidari, a Yemeni-American security manager for an oil company in the Yemeni capital Sanaa, told Reuters.

The bans affect travellers with passports from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen and even extends to green card holders who are granted authorisation to live and work in the United States, according to a Department of Homeland Security spokeswoman.

The news agency said that in Cairo, five Iraqi passengers and one Yemeni were barred from boarding an EgyptAir flight to New York on Saturday, according to sources at the airport.

The passengers, arriving in transit to Cairo airport, were stopped and re-directed to flights headed for their home countries despite holding valid visas, the sources said.

May refuses to condemn Muslim ban

Betsy Fisher of the International Refugee Assistance Project, said of the ban: “[This] announcement is a betrayal of the fundamentally American value of welcoming those who are fleeing persecution. The US refugee programme is essential to US foreign relations and national security. Abandoning refugees means abandoning American humanitarian leadership.”

Mana Yegani, an immigration lawyer in Houston, who works with the American Immigration Lawyers Association, said Customs and Border Patrol agents at many airports were unaware of the executive order early on Friday evening. She said she had spent the night fielding calls from travellers with student and worker visas who were being denied entry to the US.

Green card holders were also being stopped and questioned for several hours. Officials also denied travellers with dual Canadian and Iranian citizenship from boarding planes in Canada that were headed the United States, she said.

“These are people that are coming in legally. They have jobs here and they have vehicles here,” she told Reuters.

One of the two Iraqis held in New York, Hameed Khalid Darweesh, had worked on behalf of the US government in Iraq for 10 years. The other man, Haider Sameer Abdulkhaleq Alshawi, had flown to the US to join his wife, who had worked for a US contractor.

Mr Darweeh was eventually released after the intervention of local politicians and lawyers. Mr Darweesh thanked the people who had worked to set him free.