People gather to protest against the travel ban imposed by President Donald Trump's executive order at O'Hare airport in Chicago, Jan. 28, 2017. REUTERS/Kamil Krzaczynski

UPDATE: 2:04 a.m. EST — The second court ruling against President Donald Trump's executive order on immigration, passed late Saturday night by federal judges in Boston, applies only to Massachusetts. The court order allows holders of valid immigrant and non-immigrant visas, lawful permanent residents, and other individuals from Syria, Yemen, Sudan, Somalia, Iraq, Iran and Libya, to legally enter the United States.

UPDATE: 1:52 a.m. EST — Federal judges in Boston passed an order late Saturday night, saying Customs officials could not detain anyone solely on the basis of the executive order by President Donald Trump that bans citizens from seven Muslim-majority countries from entering the United States.

Original story:

Federal Judge Ann Donnelly issued a ruling Saturday, in Brooklyn, New York, effectively blocking a part of President Donald Trump's executive order on banning immigration from seven Muslim-majority countries.

Trump's executive order, implemented Jan. 27, halted refugee arrivals into the U.S. for 120 days and called for an immediate suspension of immigration from countries with ties to terror — including Syria, Yemen, Sudan, Somalia, Iraq, Iran and Libya — for 90 days. It also called for complete suspension of allowing Syrian refugees into the country for an indefinite period.

Donnelly ordered that refugees and others from the countries on the list, who were detained at airports across the U.S., should not be sent back to their home countries. Her order read: "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."

This order will temporarily allow those who have landed in the U.S. with valid visas to remain in the country. But it does not appear to overturn the Trump administration policy, and Donnelly stopped short of issuing a broader ruling on the constitutionality of Trump's actions.

The American Civil Liberties Union filed a habeas corpus petition on behalf of two Iraqi refugees, Hameed Khalid Darweesh and Haider Sameer Abdulkhaliq Alshawi, who were detained by border agents at John F. Kennedy airport in New York City, despite having previously been granted stay in the country and holding valid visas. Both men were released Saturday. The ACLU lawyers argued that Trump's executive order was "unconstitutional" and a "violation of international law."

The court decision came as protests spread to airports across the country in several cities over Trump's immigration ban. At least 55 passengers were detained or sent home from at least six different airports so far, and hundreds of people around the world were barred from boarding U.S.-bound flights.

Hundreds of people at the John F. Kennedy International Airport protested against Trump's order, chanting "No hate, no fear, refugees are welcome here. No hate, no fear, Muslims are welcome here." They also received support from New York Mayor Bill De Blasio.