NEW YORK (Reuters) - A federal judge on Friday ruled that the Trump administration must fully restore a program that protects from deportation some young immigrants who were brought to the United States illegally as children, including accepting new applications for the program.

U.S. District Judge John Bates in Washington, D.C., said he would stay Friday’s order, however, until August 23 to give the administration time to decide whether to appeal.

Bates first issued a ruling in April ordering the federal government to continue the Deferred Action for Childhood Arrivals, or DACA, program, including taking applications. He stayed that ruling for 90 days to give the government time to better explain why the program should be ended.

On Friday Bates, who was appointed by former President George W. Bush, a Republican, said he would not revise his previous ruling because the arguments of President Donald Trump’s administration did not override his concerns.

Under DACA, roughly 700,000 young adults, often referred to as “Dreamers”, were protected from deportation and given work permits for two-year periods, after which they must re-apply to the program.

The program was created in 2012 under former President Barack Obama, a Democrat.

Two other federal courts in California and New York had previously ordered that DACA remain in place while litigation challenging Trump’s decision to end it continued. Those rulings only required the government to process DACA renewals, not new applications.

Another lawsuit in a Texas federal court is seeking to end DACA.

A spokesman for the U.S. Department of Justice said on Friday that the government would continue to defend its position that it “acted within its lawful authority in deciding to wind down DACA in an orderly manner.”

Congress so far has failed to pass legislation to address the fate of the Dreamers, including a potential path to citizenship.

Friday’s ruling came in lawsuits filed by several groups and institutions, including the National Association for the Advancement of Colored People and Princeton University.