WASHINGTON — In the middle of an intense political fight about the program that shields from deportation young immigrants who were brought illegally to the United States as children, a federal judge in California issued a nationwide injunction late Tuesday ordering the Trump administration to start the program back up again.
Saying the decision to kill it was improper, Judge William Alsup of Federal District Court in San Francisco wrote that the administration must “maintain the DACA program on a nationwide basis” as the legal challenge to the president’s decision goes forward.
President Barack Obama created the Deferred Action for Childhood Arrivals program, known as DACA, in 2012 to also give young immigrants the ability to work legally in the United States. President Trump moved to end the program in September, saying that Mr. Obama’s actions were unconstitutional and an overreach of executive power.
That decision has set off a fierce debate in Washington as Democrats and Republicans spar about how to provide relief for about 800,000 immigrants who could face deportation when the program ends on March 5. Mr. Trump met with lawmakers on Tuesday afternoon in a remarkable, hourlong televised meeting to begin negotiations.
But critics of the president’s decision to end the policy, including several states and organizations, had already sued the administration, saying that shutting down the program was arbitrary and done without following the proper legal procedures.
One of the lead plaintiffs in the case, Janet Napolitano, is currently the president of the sprawling University of California system of colleges but served as the secretary of homeland security for Mr. Obama in 2012 and was an architect of the DACA program.
In his ruling, Judge Alsup questioned the administration’s contention that the DACA program had not been put into place legally. He asserted that the secretary of the Department of Homeland Security has long had the authority to grant the kind of temporary protections that formed the basis of the program.
Judge Alsup also cited several of Mr. Trump’s Twitter posts that expressed support for the program. He noted that in September, the president wrote: “Does anybody really want to throw out good, educated and accomplished young people who have jobs, some serving in the military? Really!” Such tweets, the judge said, bolstered the idea that keeping the program going was in the public’s interest.
The judge wrote that previous beneficiaries of DACA, known as Dreamers, must be allowed to renew their status in the program, though the government will not be required to accept new applications from immigrants who had not previously submitted one. The judge also said the administration could continue to prevent DACA recipients from returning to the United States if they leave the country.
It is unclear what the legal effect could be from the judge’s ruling, but the Trump administration may be headed for more intense legal wrangling like the kind that happened after the president’s travel bans.
A spokesman for the Justice Department, Devin O’Malley, said that the ruling did not change the department’s stance.
“DACA was implemented unilaterally after Congress declined to extend these benefits to this same group of illegal aliens,” he said. “As such, it was an unlawful circumvention of Congress, and was susceptible to the same legal challenges that effectively ended DACA. The Department of Homeland Security therefore acted within its lawful authority in deciding to wind down DACA in an orderly manner. Promoting and enforcing the rule of law is vital to protecting a nation, its borders, and its citizens.”
The administration could quickly appeal the judge’s ruling, hoping that an appeals court would prevent the injunction from taking effect and allowing the shutdown of the DACA program as the president announced in September.
But such a ruling could itself be appealed all the way to the Supreme Court, potentially tying the fate of the DACA program in court action for days, weeks or longer.
Either way, the ruling could have serious political effect.
If the court’s order to restart the DACA program stands, that could take pressure off Republicans and Democrats to find a political solution for the young immigrants who could be deported if the program ends.
Almost immediately after the president rescinded the DACA program in September, Mr. Trump expressed sympathy for the young immigrants who were children when their parents brought them to the country illegally. Mr. Trump repeated his sympathies on Tuesday at the White House meeting.
Democrats have seized on the president’s attitude, urging their Republican colleagues to support legislation that would permanently legalize the Dreamers to work in the United States, and give them an eventual path to American citizenship.
But hard-line conservatives say that would amount to an amnesty program for lawbreakers, and some Republicans in Congress have been pressing for other immigration changes before they will support legislation for the Dreamers.
In particular, Republicans at the White House meeting demanded an end to rules that allow immigrants to sponsor their extended family members — aunts, uncles, cousins — to enter the United States. And they want an end to a State Department visa lottery program that prioritizes legal immigration from certain countries in Africa and elsewhere.
Democrats have warned that demands for those measures could undermine support from their party for legislation on the Dreamers, potentially threatening a budget deal necessary to keep the government open past this month.
Xavier Becerra, the California attorney general and a former Democratic representative in Congress, filed one of the lawsuits seeking to block the administration from ending the DACA program. He hailed the judge’s ruling in a statement.
“Today’s ruling is a huge step in the right direction,” Mr. Becerra said. “We will fight at every turn for their rights and opportunities so they may continue to contribute to America.”
But some advocates expressed concern that the legal efforts, while well intentioned, could undermine the push to earn permanent relief for the young immigrants.
Camille Mackler, the director of immigration legal policy at the New York Immigration Coalition, said that while advocates were relieved that more DACA recipients would be able to renew their membership, they expected the government to appeal the judge’s ruling.
In the meantime, she said, only legislation offering legal status to Dreamers would suffice to protect them.
“This is not a win for us,” Ms. Mackler said. “We’re obviously glad that this is going to provide some relief, but what we really need is a clean Dream Act,” a reference to a bill that only legalizes the young immigrants without also imposing other immigration changes that Republicans are demanding.