WASHINGTON -- The Supreme Court on Thursday rejected President Donald Trump's effort to end legal protections for 650,000 young immigrants, the second stunning election-season rebuke from the court in a week after its ruling that it's illegal to fire people because they're gay or transgender.
Immigrants who are part of the 8-year-old Deferred Action for Childhood Arrivals Program will retain their protection from deportation and their authorization to work in the United States - safe almost certainly at least through the November election, immigration experts said.
The 5-4 outcome, in which Chief Justice John Roberts and the four liberal justices were in the majority, seems certain to elevate the issue in Trump's campaign, given the anti-immigrant rhetoric of his first presidential run in 2016 and immigration restrictions his administration has imposed since then.
The justices said the administration did not take the proper steps to end DACA, rejecting arguments that the program is illegal and that courts have no role to play in reviewing the decision to end it. The program covers people who have been in the United States since they were children and are in the country illegally. In some cases, they have no memory of any home other than the U.S.
Trump didn't hold back in his assessment of the court's work, hitting hard at a political angle.
Watch: ABC News special report:
"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. We need more Justices or we will lose our 2nd Amendment & everything else. Vote Trump 2020!" he wrote on Twitter, apparently including the LGBT ruling as well.
In a second tweet, he wrote, "Do you get the impression that the Supreme Court doesn't like me?"
Later, he said the decision showed the need for additional conservative justices to join the two he has appointed, Neil Gorsuch and Brett Kavanaugh, and pledged to release a new list from which he would choose a nominee if another opening occurs on his watch. Both of his appointees dissented on Thursday, though Gorsuch wrote the LGBT rights ruling.
Democratic presidential contender Joe Biden pledged to send Congress proposed legislation on his first day in office to make DACA protections permanent.
Roberts, with whom Trump has sparred, wrote for the court that the administration did not pursue the end of the program properly.
"We do not decide whether DACA or its rescission are sound policies," Roberts wrote. "We address only whether the agency complied with the procedural requirement that it provide a reasoned explanation for its action. Here the agency failed to consider the conspicuous issues of whether to retain forbearance and what if anything to do about the hardship to DACA recipients."
The Department of Homeland Security can try again, he wrote. But any new order to end the program, and the legal challenge it would provoke, would likely take months, if not longer.
"No way that's going to happen before November," said Stephen Yale-Loehr, a professor of immigration law practice at Cornell University Law School.
The court's four conservative justices dissented. Justice Clarence Thomas, joined by Justices Gorsuch and Samuel Alito, wrote that DACA was illegal from the moment it was created under the Obama administration in 2012. Thomas called the ruling "an effort to avoid a politically controversial but legally correct decision."
Alito wrote that federal judges had prevented DACA from being ended "during an entire Presidential term. Our constitutional system is not supposed to work that way."
Justice Kavanaugh wrote in a separate dissent that he was satisfied that the administration acted appropriately.
DACA recipients were elated by the ruling.
"We'll keep living our lives in the meantime," said Cesar Espinosa, who leads the Houston immigration advocacy group FIEL. "We're going to continue to work, continue to advocate."
Espinosa said he got little sleep overnight in anticipation of a possible decision. In the minutes after the decision was posted, he said his group was "flooded with calls with Dreamers, happy, with that hope that they're going to at least be in this country for a while longer."
From the Senate floor, the Democratic leader Chuck Schumer said of the DACA decision, "I cried tears of joy."
"Wow," he went on, choking up. "These kids, these families, I feel for them, and I think all of America does.
Republican Sen. Tom Cotton of Arkansas had a different take, labeling DACA illegal and focusing his wrath on Roberts.
"Yet John Roberts again postures as a Solomon who will save our institutions from political controversy and accountability. If the Chief Justice believes his political judgment is so exquisite, I invite him to resign, travel to Iowa, and get elected," Cotton said in a statement.
The program grew out of an impasse over a comprehensive immigration bill between Congress and the Obama administration in 2012. President Barack Obama decided to formally protect people from deportation while also allowing them to work legally in the U.S.
But Trump made tough talk on immigration a central part of his campaign and less than eight months after taking office, he announced in September 2017 that he would end DACA.
Immigrants, civil rights groups, universities and Democratic-led states quickly sued, and courts put the administration's plan on hold.
The Department of Homeland Security has continued to process two-year DACA renewals so that hundreds of thousands of DACA recipients have protections stretching beyond the election and even into 2022. No new applications have been accepted since 2017, and it probably would take a court order to change that, Yale-Loehr said.
The Supreme Court fight over DACA played out in a kind of legal slow motion. The administration first wanted the justices to hear and decide the case by June 2018. The justices said no. The Justice Department returned to the court later in 2018, but the justices did nothing for more than seven months before agreeing a year ago to hear arguments. Those took place in November and more than seven months elapsed before the court's decision.
Thursday's ruling was the second time in two years that Roberts and the liberal justices faulted the administration for the way it went about a policy change. Last year, the court forced the administration to back off a citizenship question on the 2020 census.
In 2018, Roberts joined his conservative colleagues to preserve Trump's travel ban affecting several countries with largely Muslim populations. In that instance, Roberts wrote the administration put the policy - or at least its third version - in place properly.