The American Civil Liberties Union (ACLU) is celebrating after a federal judge ruled in its favor, temporarily halting the removal of refugees and immigrants detained following President Trump Donald John TrumpTrump says Kim not responsible for Otto Warmbier's death: 'I will take him at his word' Trump: I 'trust' Kim's promise he won't resume nuclear, missile tests Trump blasts Cohen, but 'impressed' with collusion comments MORE's immigration ban.

“I hope Trump enjoys losing. He’s going to lose so much we’re going to get sick and tired of his losing,” ACLU national political director Faiz Shakir told Yahoo News shortly after the decision was announced.

Shakir was referencing a similar quote from Trump that he used in cheering on his own election victory.

"Our courts today worked as they should as bulwarks against government abuse or unconstitutional policies and orders," the ACLU also tweeted.

ADVERTISEMENT

"On week one, Donald Trump suffered his first loss in court."

Our courts today worked as they should as bulwarks against government abuse or unconstitutional policies and orders. — ACLU National (@ACLU) January 29, 2017

On week one, Donald Trump suffered his first loss in court. — ACLU National (@ACLU) January 29, 2017

The court ruling appears to mark the first successful legal challenge to the Trump administration and affects those who have arrived in the U.S. with previously approved refugee applications or were in transit with valid visas.

U.S. District Court Judge Ann Donnelly ruled in favor of a habeas corpus petition filed by the American Civil Liberties Union (ACLU) on behalf of two Iraqi men who were detained at John F. Kennedy International Airport on Friday after Trump signed his order.

Donnelly, who was nominated by former President Barack Obama Barack Hussein ObamaDem governors struggle for attention in crowded 2020 race Obama portraits brought more than 1 million visitors to National Portrait Gallery in first year With low birth rate, America needs future migrants MORE and confirmed to her judgeship in 2015, ruled in the Eastern District of New York that "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 Trump's order.

“Clearly the judge understood the possibility for irreparable harm to hundreds of immigrants and lawful visitors to this country," ACLU Executive Director Anthony D. Romero said in a statement.

"Our courts today worked as they should as bulwarks against government abuse or unconstitutional policies and orders. On week one, Donald Trump suffered his first loss in court.”