Donald Trump is facing a fierce backlash at home and abroad after his decision to ban families fleeing violence in Syria from entering the US and to temporarily suspend immigration from predominantly Muslim countries.
There was chaos and confusion at airports around America, as customs officials sought to implement the executive order that prevents entry to Syrians indefinitely, all other refugees for four months and bans travellers from seven Middle Eastern countries.
"I'm establishing new vetting measures to keep radical Islamic terrorists out of the United States of America," the US president said as he signed the order at the Pentagon. "Don't want them here."
Even as several foreign governments condemned the decision, Theresa May, the UK prime minister, who has sought to develop close ties with Trump, avoided criticising his actions.
After being asked three times if she condemned the decision to ban families fleeing slaughter in war zones, May said: "The United States is responsible for the United States' policy on refugees."
Lawyers and human rights groups took legal action yesterday, filing lawsuits which argued that the orders went against both the spirit of the US constitution and the letter of American law.
The order, which came into force as soon as Trump signed it on Friday afternoon, requires US border officials to turn away any person arriving from Syria, Iraq, Iran, Sudan, Libya, Somalia and Yemen for the next 90 days, whether or not they have a green card.
With only a few exceptions for diplomats and dual citizens, the order takes no account of whether travellers have already been issued with visas.
In announcing his "extreme vetting" plan, Trump invoked the September 11 attacks. But most of the 19 plane hijackers were from Saudi Arabia, the United Arab Emirates, Egypt and Lebanon - all countries not included on the ban list.
Within hours of the order being signed, chaos broke out at airports around the world as officials sought to understand and interpret the new policies. Mohammed Al Rawi, a graduate of California State University and former journalist with the LA Times, said his father had been hauled off a flight in Qatar as a direct result of Mr Trump's decision.
"My 71-year-old dad is in Qatar boarding a LAX flight to come visit us and he's being sent back to Iraq. Some US official told him Trump cancelled all visas," he wrote on Facebook hours after the order was signed.
Five Iraqi passengers and one Yemeni were barred from boarding an Egypt Air flight from Cairo to New York on Saturday.
Some airlines have warned that all passengers whose journeys began in any of the seven countries may be affected, even if their own citizenship is not on the "banned" list.
Matt Zellar, an army captain who runs No One Left Behind, a charity that seeks to bring to the US Afghanis and Iraqis who worked with the American military in their countries, said the bans had caused their programmes to be suspended.
Mr Zellar works with people who have been placed on death lists by the Taliban, Isil, or other extremist organisations for the time they spent working with the US military. He said that the process of getting these men and their families into America had always been laborious, sometimes taking five years to obtain a visa. But the executive order was forcing him mostly to suspend the programme.
"Some have been waiting years, moving night by night and living away from their families to escape death squads," Mr Zellar said. "This closes out their last hope. Heroes and patriots who saved American lives are going to die for their service to us."
The executive order includes a potential loophole that says the Secretaries of State and Homeland Security may, on a "case-by-case basis, and when in the national interest, issue visas or other immigration benefits to nationals of countries for which visas and benefits are otherwise blocked".
But Mr Zellar said repeated efforts to reach the White House to get permission to apply this to former US military employees had failed.
Refugee-rights groups and others immediately challenged the orders in court, and said the bans scapegoated Muslims and Arabs without making the US safer.
Trump's order came down as Hameed Khalid Darweesh, a translator and assistant for the US military in Iraq for 10 years now fleeing death threats over his US ties, was just minutes away from landing at JFK Airport in New York.
US officials detained Darweesh and another Iraqi whom the US government also had already approved for entry. After lawyers for refugee-rights organisations filed emergency petitions in federal court for their release, Darweesh walked free, to the applause of sign-waving demonstrators gathered at the airport to protest the ban.
"This is the soul of America," Darweesh told the crowd and reporters there, of those who had worked for his asylum and his release.
Asked what he thought of the US now, Darweesh pointed a finger in the air, and said emphatically, "America is the greatest nation, the greatest people in the world."
Meathaq Alaunaibi, also a refugee from Iraq, was hoping to soon be reunited with her twin 18-year-old daughters who are in Baghdad. Alaunaibi, her husband, a son and another daughter were settled last August in Tennessee, as the twins completed their government review to enter the US. After Trump signed the order, she spoke by phone with her daughters.
"They are so worried and afraid because they're stuck there in Baghdad," Alaunaibi said yesterday. "They are young and they are strong, but I am crying all the time. I miss them."
Staff at US agencies that resettle refugees were scrambling to analyse the order and girded themselves for the wrenching phone calls that would have to be made to the thousands of refugees just days away from traveling to the US. Several staff who spoke to reporters burst into tears as they contemplated the future for people who had waited years to come into the country.
The International Refugee Assistance Project, which aids foreign nationals targeted for their work for the US government, was sending the same message to asylum-seekers, most of them who had been waiting for years.
"We have to reach out to hundreds of our clients and explain that their future has been taken away from them, and we don't know when they'll get it back," said the group's executive director.
An Iraqi in Mosul, an Iraqi city where the Islamic State group had seized control, despaired at word that what he had thought was an imminent flight to safety in America was now canceled, indefinitely.
"If you can write to Mr Trump or find any other way to help me reunite with my family, please, I am dying in Iraq, please," the man, whose identity was withheld because he is still in danger in Iraq, wrote back to his US lawyer by email.
Before Trump signed the order, more than 67,000 refugees had been approved by the US federal government to enter the US, said Jen Smyers, refugee policy director for Church World Service. More than 6,400 had already been booked on flights, including 15 families that had been expected over the next few weeks in the Chicago area from Ethiopia, Eritrea, Iran, Syria and Uganda.
The bulk of refugees entering the US are settled by religious groups, who organise synagogues, churches and mosques to collect furniture, clothes and toys for the refugees and set up volunteer schedules for hosting duties. All that work ground to a halt after Trump signed the order.
In Massachusetts, Jewish Family Services of MetroWest had been coordinating a group of doctors, community leaders, a local mosque and other volunteers to resettle 15 Syrian families, including a one-year-old and a five-year-old who arrived on Tuesday.
Now, two fully outfitted apartments remain empty and it's unclear when, if ever, the other refugees will be allowed to enter, said Marc Jacobs, chief executive of the Jewish service group.
"I'm very worried," he said. "This executive order will have a profound impact."
The order also sparked concern in the business world. Google recalled all travelling staff members to the US following the order, and warned of the possible impact on recruiting abroad. "We'll continue to make our views on these issues known to leaders in Washington and elsewhere," a Google spokesman said.
Iran last night said that it would stop US citizens entering their country in retaliation against Washington's visa ban, calling it an "open affront against the Muslim world and the Iranian nation".
Trump last night said his crackdown on refugees and citizens from seven majority-Muslim countries was "not a Muslim ban."
And he added that it's "working out very nicely."