Late Friday afternoon President Donald Trump signed a sweeping executive order for restricting immigration and suspending the resettlement of refugees here, sparking a federal lawsuit and causing massive confusion at the nation’s airports this weekend.

The order — parts of which were been put on hold Saturday night by a federal judge in New York — invokes the Sept. 11 terrorist attacks, saying it is aimed at preventing another such strike in the U.S.

“Our country needs strong borders and extreme vetting, NOW,” Trump tweeted this morning. “Look what is happening all over Europe and, indeed, the world — a horrible mess!”

Trump’s order, signed Friday, suspends all refugee entries for 120 days.

Among other things, Trump’s order:

• Bars people from seven predominantly Muslim countries from entering the U.S. for three months: Iraq, Syria, Iran, Sudan, Libya, Somalia and Yemen. None of the 19 hijackers who carried out the Sept. 11 terrorist attacks are from those countries. The New York Times reported the Trump administration has said the order also bars green card holders from those seven countries from re-entering the U.S., though the government said exemptions could be granted.

• Blocks any refugees from resettling in the U.S. for four months;

• Indefinitely bars Syrian refugees from resettling here;

• Caps the number of any refugees who could be resettled here this fiscal year at 50,000, down from the 110,000 ceiling set by the Obama administration;

• Calls for a new security screening program to weed out potential terrorists, involving in-person interviews, background checks and a “process to evaluate the applicant’s likelihood of becoming a positively contributing member of society and the applicant’s ability to make contributions to the national interest.”

• Directs his administration to come up with a plan for allowing state and local officials to be more involved in the process for determining the placement of refugees in their communities.

Late Saturday night, U.S. District Court Judge Ann Donnelly halted parts of Trump’s order, stopping his administration from removing refugees approved by the government, people with valid immigrant and non-immigrant visas and others from Iraq, Syria, Iran, Sudan, Libya, Somalia, and Yemen.