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 TrumpHR McMaster says president's policy to withdraw troops from Afghanistan is 'unwise' Cast of 'Parks and Rec' reunite for virtual town hall to address Wisconsin voters Biden says Trump should step down over coronavirus response 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 ObamaThe Hill's 12:30 Report - Presented by Facebook - Don't expect a government check anytime soon Trump appointees stymie recommendations to boost minority voting: report Obama's first presidential memoir, 'A Promised Land,' set for November release 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.”