“It’s a great victory today,” said Susan Church, a lawyer who argued the case in court. “What’s most important about today is this is what makes America great, the fact that we have the rule of law.”

At 1:51 a.m., Judge Allison Burroughs and Magistrate Judge Judith Dein imposed a seven-day restraining order against Trump’s executive order, clearing the way for lawful immigrants from the seven barred nations – Iran, Iraq, Yemen, Somalia, Sudan, Libya and Syria – to enter the US.

In a rare middle-of-the night decision, two federal judges in Boston temporarily halted President Trump’s executive order blocking immigrants from seven Muslim-majority nations from entering the United States.


The ruling prohibits federal officials from detaining or deporting immigrants and refugees with valid visas or green cards or forcing them to undergo extra security screenings based solely on Trump’s order. The judges also instructed Customs and Border Protection to notify airlines overseas that it is safe to put immigrants on US-bound flights.

The judges issued the ruling in a lawsuit filed by the ACLU, Church and other lawyers initially on behalf of two University of Massachusetts Dartmouth professors, both Muslim green card holders from Iran, who were detained and interrogated for about three hours Saturday at Logan International Airport.

The professors, Mazdak Pourabdollah Tootkaboni and Arghavan Louhghalam, are permanent residents of the United States who left the country for an academic conference, the petition said. They arrived at Logan around 5:30 p.m. Saturday and were held “solely pursuant to an executive order issued” by Trump, the petition said.

Though the professors were released, lawyers rushed to federal court fearing more people could be barred in the days ahead.

The judges agreed, ruling that the lawyers had established a “strong likelihood of success” that Trump’s order would violate immigrants’ constitutional rights and said immigrants are “likely to suffer irreparable harm” as a result of the order.


“The balance of harms favors the issuance of this temporary restraining order and its issuance is in the public interest,” the judges said.

The immigration lawyers, who had conferred with one another for hours in the dimly lit hallways of Boston’s federal court late Saturday night into Sunday morning, cheered the victory and said they hoped to make the restraining order permanent.

“This is an illegal, unconstitutional executive order and if the president continues to go forward with these kinds of plans we’re going to continue to fight him every step of the way,” said Matthew Segal, legal director of the ACLU of Massachusetts, in a press conference after the hearing.

Lawyer Kerry Doyle added, “This is our first victory and our first day in court, or night in court as the case may be, but it won’t be the last one.”

Trump’s executive order, signed on Friday, bars immigrants from the seven predominantly Muslim countries from entering the US, and halts refugees worldwide from entering the US for 120 days and Syrian refugees indefinitely.

Protests ensued around the country, including at Logan, where hundreds of people gathered Saturday night chanting, “Let them in.”

Also Saturday night, a federal judge in New York ruled that refugees and non-US citizens who have been detained at airports across the country should not be deported. A court in Virginia also issued a ruling on the order, according to media reports.


In Boston, lawyers, mostly women, rushed to federal court around 10 p.m., some still in fancy dresses from parties and galas or a Saturday night on the town.

Lawyer Sue Finegan left gala to come to the court. Susan Cohen ditched a 60th birthday party. And Laura Rotolo of the ACLU left her husband and two children to clean up at after her 6-year-old’s birthday party. Doyle carried a copy of the Immigration and Nationality Act under her arm, and lawyer Melissa Smith handed out Girl Scout cookies — Thin Mints — for sustenance.

“We all raced over to help,” Finegan said.

Court officers also were called in from home, including one who had been eating chocolate ice cream and watching the news before he got the call. And federal prosecutor Ray Farquhar, acting chief of the civil division, put down his wine glass at an engagement party and rushed into court.

He argued that the lawsuit was moot because the professors had been released, but he said the US Attorney’s office was trying to find a reasonable solution to an issue that had abruptly appeared on their radar.

Lawyers for the plaintiffs said more immigrants from the countries on Trump’s list are expected to arrive in Boston first thing Sunday, which could be the first test of the judges’ ruling.

Globe correspondent Felicia Gans contributed to this report. Maria Sacchetti can be reached at msacchetti@globe.com. Follow her on Twitter @mariasacchetti.