In a win for 800,000 young immigrants who came illegally to the United States as children, a Brooklyn federal judge refused Thursday to throw out challenges to President Donald Trump’s elimination of the program that keeps them from being deported and gives them work permits.

U.S. District Judge Nicholas Garaufis rejected the Justice Department’s claim that courts should not intervene in Trump’s exercise of “prosecutorial discretion” to eliminate the protections former President Barack Obama created in the Deferred Action for Childhood Arrivals program.

Elimination of the program, the judge said, was different from a decision on not seeking removal of a particular individual. “The rescission of the DACA program subjects individuals who previously enjoyed some protection from removal to coercive state authority,” he said.

Lawyers for New York and other states as well as individual beneficiaries, known as “Dreamers,” have sued to block the planned March elimination of the program. The Justice Department is also trying to get the Second U.S. Circuit Court of Appeals to intervene in the cases.