WASHINGTON — The Supreme Court on Tuesday struck down a law that allowed the government to deport some immigrants who commit serious crimes, saying it was unconstitutionally vague. The decision will limit the Trump administration’s efforts to deport people convicted of some kinds of crimes.
The vote was 5 to 4, with Justice Neil M. Gorsuch joining the court’s four more liberal members to form a bare majority, which was a first. Justice Gorsuch wrote that the law crossed a constitutional line.
“Vague laws,” he wrote in a concurring opinion, “invite arbitrary power.”
Justice Gorsuch had voted with the court’s conservative majority in February in a different immigration case, one that ruled that people held in immigration detention, sometimes for years, are not entitled to periodic hearings to decide whether they may be released on bail.
His vote in Tuesday’s case was not entirely surprising, though, as he has a skepticism of vague laws that do not give people affected by them adequate notice of what they prohibit.
Immigration advocates said the ruling could spare thousands of people from deportation.
“This decision is of enormous consequence, striking down a flawed law that applies in a vast range of criminal and immigration cases and which has resulted in many thousands of immigrants being deported for decades in violation of their due process rights,” said E. Joshua Rosenkranz, a lawyer for the immigrant at the center of the case.
Tyler Q. Houlton, a spokesman for the Department of Homeland Security, said the ruling would undercut “efforts to remove aliens convicted of certain violent crimes, including sexual assault, kidnapping and burglary, from the United States.”
“By preventing the federal government from removing known criminal aliens,” he said, “it allows our nation to be a safe haven for criminals and makes us more vulnerable as a result.”
The case, Sessions v. Dimaya, No. 15-1498, was first argued in January 2017 before an eight-member court left short-handed by the death of Justice Antonin Scalia. The justices deadlocked 4 to 4, and the case was reargued in October after Justice Gorsuch joined the court.
The case concerned James Dimaya, a native of the Philippines who became a lawful permanent resident in 1992, when he was 13. In 2007 and 2009, he was convicted of residential burglary.
The government sought to deport him on the theory that he had committed an “aggravated felony,” which the immigration law defined to include any offense “that, by its nature, involves a substantial risk that physical force against the person or property of another may be used in the course of committing the offense.”
In 2015, in Johnson v. United States, the Supreme Court ruled that a similar criminal law was unconstitutionally vague. Justice Elena Kagan, writing for the majority in Tuesday’s case, said the reasoning in the Johnson case also doomed the challenged provision of the immigration law.
She quoted at length from Justice Scalia’s majority opinion in Johnson, which said courts could not tell which crimes Congress had meant to punish.
“We can as well repeat here what we asked in Johnson,” Justice Kagan wrote, paraphrasing Justice Scalia. “How does one go about divining the conduct entailed in a crime’s ordinary case? Statistical analyses? Surveys? Experts? Google? Gut instinct?”
She added that lower courts had been unable to apply the immigration law consistently.
“Does car burglary qualify as a violent felony?” she asked. “Some courts say yes, another says no. What of statutory rape? Once again, the circuits part ways. How about evading arrest? The decisions point in different directions. Residential trespass? The same is true.”
Justices Ruth Bader Ginsburg, Stephen G. Breyer and Sonia Sotomayor joined all of Justice Kagan’s opinion, and Justice Gorsuch most of it.
When the Johnson case was before the Supreme Court, the government warned that a ruling striking down the law at issue there would make the immigration law “equally susceptible” to constitutional attack.
Both laws, the government said then, required courts to identify features of a hypothetical typical offense and then to judge the risk of violence arising from them.
But when Mr. Dimaya’s case reached the Supreme Court, the government said there were significant differences between the two laws, focusing on minor variations in their wording. In dissent, Chief Justice John G. Roberts Jr., joined by Justices Anthony M. Kennedy, Clarence Thomas and Samuel A. Alito Jr., made a similar point.
Justice Kagan responded that some of Chief Justice Roberts’s analysis was “slicing the baloney mighty thin.”
The government also argued that the two laws should be treated differently because one concerned crimes and the other immigration, which is a civil matter.
In its brief, the government said civil laws are almost never so vague as to violate the Constitution. “Although the court has on occasion tested civil provisions for vagueness,” the brief said, “it has struck down those provisions under the due process clause because they were so unintelligible as to effectively supply no standard at all.”
Justice Kagan disagreed. “This court’s precedent forecloses that argument,” she wrote, “because we long ago held that the most exacting vagueness standard should apply in removal cases.”
A 1951 Supreme Court decision, Jordan v. De George, indicated that both criminal and immigration laws should be tested against the same constitutional standard for vagueness “in view of the grave nature of deportation.”
Near the end of her opinion, Justice Kagan again quoted Justice Scalia. “Insanity,” he wrote in a 2011 dissent, “is doing the same thing over and over again, but expecting different results.”
Justice Kagan said it was time to heed that advice. “We abandoned that lunatic practice in Johnson,” she wrote, “and see no reason to start it again.”
Follow Adam Liptak on Twitter: @adamliptak.