A federal judge in Brooklyn has ordered President Donald Trump’s administration to post a public notice that it's accepting new applications for Deferred Action for Childhood Arrivals (known as DACA) for the first time since 2017.

The policy—originally created in 2012 by former President Barack Obama to protect undocumented immigrants brought to the U.S. as children—has been a favorite target of the Trump administration’s immigration hardliners.

District Judge Nicholas Garaufis ruled that the government must now post a public notice by next week on the U.S. Department of Homeland Security's website, and other relevant websites, stating it's accepting applications for first-time DACA recipients. The notice also states the government will renew employment authorization for two years instead of one.

Garaufis was the same judge who also ruled in mid-November that the Trump administration’s latest attempt to change DACA wasn’t legal because Acting Homeland Security Secretary Chad Wolf, who issued revisions to the policy, wasn’t lawfully appointed to his job under federal rules of succession. Wolf had created a more restrictive version of DACA in late July after the U.S. Supreme Court ruled the Trump Administration illegally ended the program three years ago.

Wolf's new version didn't allow first-time applicants and only granted one year renewals instead of the usual two years.

New York State and local advocates took the Trump administration back to court to restore the full version created under the Obama administration.

“Justice prevailed today — not just for Dreamers, but for all Americans,” Attorney General Letitia James said in a statement Friday. “Every time the outgoing administration tried to use young immigrants as political scapegoats, they defiled the values of our nation. The court’s order makes clear that fairness, inclusion, and compassion matter. America is where these young people have gone to school, where they have worked, where they have paid taxes, where they have raised families, and where they have continued to be vital members of our communities. We are proud to fight for them and grateful to deliver them the justice they are due.”

A day-laborer advocacy group on Staten Island also called on President-elect Joe Biden and his administration to prioritize immigration reform:

"The law was on our side in the courts today and now we call on President-Elect Joe Biden and Vice President-Elect Kamala Harris to prioritize bold immigration reform to protect dreamers, parents, and immigrant workers,” Yesenia Mata, executive director of La Colmena Immigrant Rights Center, said in a statement Friday. “The Biden-Harris administration has an opportunity to actually pass bold immigration reform in the first 100 days of their administration. Don't repeat the same mistakes as the Obama-Biden administration."

On the campaign trail, Biden has repeatedly promised to protect DACA when he gets into office.