WASHINGTON — The Supreme Court protected young immigrants from immediate deportation on Thursday, but the decision ensured that their long-term fate would remain at the center of a divisive political clash as President Trump fights for another term in the final months of the 2020 election.
The court’s opinion, written by Chief Justice John G. Roberts Jr., was a victory for so-called Dreamers, the young immigrants who face deportation and the loss of work permits if the program known as Deferred Action for Childhood Arrivals, or DACA, is terminated. But the court did not say that Mr. Trump could not end it, only that he did not follow the proper rules and procedures in trying to do so.
The president and his hard-line immigration advisers like Stephen Miller must now decide whether to give up or try again — an effort that would almost certainly extend beyond the election in the fall. But in a series of posts on Twitter, Mr. Trump hinted that he intended to make good on his promise in 2016 to eliminate the program, which he has called an illegal use of executive authority by President Barack Obama.
“Now we have to start this process all over again,” Mr. Trump wrote, calling the court’s opinion “a highly political one, and seemingly not based on the law.”
For Mr. Trump, no issue is more fraught. Few things would fire up his base more than renewing his plan to deport hundreds of thousands of undocumented immigrants just months before the election. Failing to deliver on that pledge risks alienating his most fervent supporters on the issue that powered his victory to the White House.
Chad F. Wolf, the acting secretary of the Department of Homeland Security, insisted on Thursday that that would not happen.
“The DACA program was created out of thin air and implemented illegally,” he said. “The American people deserve to have the nation’s laws faithfully executed as written by their representatives in Congress — not based on the arbitrary decisions of a past administration. This ruling usurps the clear authority of the executive branch to end unlawful programs.”
But the Dreamers are not the gang members he so often claims are part of caravans from Central America arriving at the southwestern border. Most are respected members of society who are in many ways indistinguishable from the American citizens with whom they attended elementary, middle and high school.
And pushing for an end to DACA could alienate swing voters who are critical to Mr. Trump’s hopes for a second term and for moderate Republicans who are crucial to the party’s effort to maintain control of the Senate. Public polls show overwhelming support for the young immigrants, even among Republican voters.
“Is the president going to make the closing argument for his election an effort to strip away DACA and start large scale deportation for the Dreamers?” Todd Schulte, the president of Fwd.us, a business group that advocates on behalf of immigrants, asked Thursday after the ruling. “That is a political loser.”
At the same time, the court’s 5-to-4 decision gives Mr. Trump a new opening to rally his right-wing base by arguing that he needs another four years to stack the courts with conservative jurists who will rule in his favor on immigration, abortion, gun rights and other contentious cultural issues. Since taking office, Mr. Trump — with the help of Senator Mitch McConnell of Kentucky, the Republican leader — has aggressively pushed to install conservative judges on the bench, including two to the Supreme Court: Justices Neil M. Gorsuch and Brett M. Kavanaugh.
And on Thursday, the president made clear his work was not done.
“These horrible & politically charged decisions coming out of the Supreme Court are shotgun blasts into the face of people that are proud to call themselves Republicans or Conservatives,” Mr. Trump tweeted barely an hour after the court announced that he had improperly terminated the Obama-era program.
Senator Tom Cotton, Republican of Arkansas, echoed Mr. Trump in a statement, lashing out at Chief Justice Roberts, who was appointed by President George W. Bush, a Republican, and vowing to make the court an issue in November.
“If the chief justice believes his political judgment is so exquisite, I invite him to resign, travel to Iowa, and get elected,” Mr. Cotton wrote. “I suspect voters will find his strange views no more compelling than do the principled justices on the court.”
After the court’s ruling on Thursday, immigration advocates said they took seriously the president’s threat to once again try to terminate DACA, promising to fight for the permanent legal status of nearly 800,000 young immigrants.
“They may be foolish enough to go after DACA again, but I hope they know and see that America has the DREAMERS’ backs,” Cecilia Muñoz, who served as Mr. Obama’s top adviser on Hispanic issues and domestic policy, wrote on Twitter. She added a warning to the president and his aides about the political power of the pro-immigrant movement.
“We see you, Donald Trump, we see you Stephen Miller,” she said, “and we’re coming for you.”
Whatever the president decides to do, the debate over what happens to the Dreamers in the long run will play out most starkly in the presidential contest between Mr. Trump and the presumptive Democratic nominee, former Vice President Joseph R. Biden Jr.
Mr. Biden hailed the ruling on Thursday and vowed to introduce legislation on his first day in office that would give the young immigrants permanent legal status in the United States. Efforts to pass such legislation have failed for more than a decade, but he said the court’s temporary protections raise the stakes of the November election.
“I will continue to stand with DACA recipients, their parents and their families at every step, and in November, joined by millions across this country, we will reject the president who tried to rip so many of our family members, friends and co-workers out of our lives,” Mr. Biden said in a statement.
The issue is already at the forefront of several key Senate races. Hours after the ruling, a Democratic group issued a news release calling attention to votes by Senator Cory Gardner, a moderate Republican from Colorado.
“Time and again Cory Gardner voted to repeal DACA and deport thousands of Colorado Dreamers and no amount of election season revisionist history from Gardner can change that,” wrote Zach Hudson, a spokesman for the group, American Bridge.
In Arizona, the court ruling could help efforts by Democrats who are seeking to defeat Senator Martha McSally. Tomás Robles Jr., the co-executive director of Living United for Change in Arizona, said Thursday that the temporary nature of the decision created an energy and immediacy around defeating Ms. McSally and blocking Mr. Trump’s re-election.
“We have a few months to get him out of office. And if we don’t succeed, he will come with the correct process to eliminate DACA,” Mr. Robles said.
But on Thursday, Trump administration officials gave little indication that they were looking for compromise on the issue.
Stephanie Saul contributed reporting from New York, and Hank Stephenson from Phoenix.