Refugees and anyone else looking to skirt President Trump’s ban on Middle Eastern travelers are being advised to head for Boston’s Logan International Airport, thanks to an expansive federal court order that stayed the executive order here for seven days.

Becca Heller of the International Refugee Assistance Project told reporters in a conference call yesterday that the Boston decision, issued early yesterday morning, goes further than one issued earlier in New York because it expressly prevents any removals and detainment on the basis of Trump’s order — instead of just removals — for seven days. Heller said her group is advising refugees to fly in through Boston for now.

The Massachusetts Institute of Technology issued a letter yesterday also advising people to aim for Logan.

“If you are a directly affected member of the MIT community who is currently traveling outside the United States and you wish to return to campus, we encourage you to fly back to Boston — directly to Logan Airport — as soon as possible, and before February 4,” reads the letter, signed by Provost Martin A. Schmidt, Chancellor Cynthia Barnhart and Vice President for Research Maria T. Zuber.

The temporary restraining order granted by U.S. District Court Judge Allison D. Burroughs and U.S. Magistrate Judge Judith Gail Dein says the government for the next seven days “shall not, by any manner of means, detain or remove individuals with refugee applications approved by” the United States, or holders of visa and green card holders, “who, absent the Executive Order, would be legally authorized to enter the United States.”

The court order also directs U.S. Customers and Border Protection to notify airlines that have flights arriving at Logan Airport of the order and that those on board would “not be detained or returned based solely on the basis of this order.”

A Logan spokesman referred questions to Customs and Border Protection, which did not respond to a request for comment last night.

Trump’s order, issued Friday, severely restricts immigration from Iraq, Syria, Iran, Sudan, Libya, Somalia and Yemen. It also suspends all refugee admission for 120 days, and bars all Syrian refugees indefinitely.

The order sent shock waves when people with green cards from those countries were detained for extra questioning in U.S. airports Saturday, including two University of Massachusetts Dartmouth professors, Mazdak Tootkaboni and Arghavan Louhghalam. Lawyers for the pair secured the Boston court restraining order.

East Boston immigration lawyer Matthew Cameron said he would also advise affected clients to re-enter the U.S. through Boston.

“It protects them for the next seven days,” he said. “If you have travel plans, just wait until this kind of blows over. If you’re already out of the country, come back now and come through Boston.”

But local immigration attorney Marisa DeFranco questioned if the court order’s citation of due process and equal protection rights applies to green card holders in such a way that can limit border agents’ questioning.

“I’m not sure if they’re standing on solid constitutional ground,” she said.