(CNN)A federal judge granted an emergency stay Saturday night for citizens of seven Muslim-majority countries who have already arrived in the US and those who are in transit, and who hold valid visas, ruling they can legally enter the US — a decision that halts President Donald Trump’s executive order barring citizens from those countries from entering the US for the next 90 days.

“The petitioners have a strong likelihood of success in establishing that the removal of the petitioner and other similarly situated violates their due process and equal protection guaranteed by the United States Constitution,” US District Judge Ann Donnelly wrote in her decision.

“There is imminent danger that, absent the stay of removal, there will be substantial and irreparable injury to refugees, visa-holders, and other individuals from nations subject to the January 27, 2017, Executive Order,” the ruling said.

The ACLU argued Saturday evening in a federal court in New York for a nationwide stay that would block the deportation of all people stranded in US airports under what the group called “President Trump’s new Muslim ban.”

Judge Ann Donnelly of the U.S. District Court in Brooklyn granted a request from the American Civil Liberties Union to stay the deportations after determining that the risk of injury to those detained by being returned to their home countries necessitated the decision.

And only minutes after the judge’s ruling in New York, another came in Virginia when U.S. District Judge Leonie Brinkema issued a temporary restraining order to block the removal of any green-card holders being detained at Dulles International Airport for seven days. Brinkema’s action also ordered that lawyers have access to those held there because of the president’s ban.