Updated

Undocumented immigrants brought to the U.S. illegally as children are again able to apply for the Deferred Action for Childhood Arrivals -- better known as DACA -- a federal judge in Brooklyn ruled Friday evening. 

Approximately 640,000 immigrants are currently enrolled in the DACA program. 

U.S. District Judge Nicholas G. Garaufis fully restored the Obama-era program, after the Trump administration has sought to end it since September 2017. The judge ordered the Department of Homeland Security to begin accepting first-time applications on Monday and ensure work permits are valid for two years.

While the challenge wound through the legal system, DHS had been able to refuse new DACA applicants. 

The administration can now petition a federal appeals court or go to the Supreme Court for temporary relief from enforcement of the judge’s order.

LEAVE DACA ALONE, TRUMP TOLD BY BUSINESS TITANS 

Acting DHS Secretary Chad Wolf issued a memo in July reducing DACA recipients' work permits to one year, but Garaufis had ruled last month that Wolf did not have lawful authority to serve as the acting secretary and vacated the memo. 

"In light of the vacatur, all parties agree that the DACA program is currently governed by its terms as they existed prior to the attempted rescission of September 2017.”

SUPREME COURT RULES AGAINST TRUMP ADMINISTRATION OVER MOVE TO END DACA PROGRAM 

In June, the Supreme Court ruled against the Trump administration's effort to rescind DACA. The court ruled that the administration's decision to rescind it violated the Administrative Procedure Act (APA), which sets out rulemaking procedures for federal agencies.

In a 5-4 opinion, the court wrote that the move to eliminate the program was done in an "arbitrary and capricious" manner although they did not rule on the merits of the program itself.

Under the program, immigrants who have cleared a background check, pursued their studies and paid fees to obtain work permits can remain in the U.S. 

CLICK HERE TO GET THE FOX NEWS APP

President-elect Joe Biden has said he would push for a path to citizenship for DACA recipients. However, a citizenship bill may stall in a Republican-led Senate.

A pair of U.S. Senate seats in Georgia are up for a runoff election in January and will determine the fate of control of Congress' upper chamber.  

Fox News' Bill Mears contributed to this report.