(CNN) The Supreme Court on Monday made it much more difficult for immigrants to challenge immigration policies in court, holding that challenges have to be brought individually and not on a class-wide basis.
In the 6-3 holding, the court concluded that, under a 1996 statute, lower federal courts lack the power to grant injunctive relief to entire classes of immigrants, as opposed to individual immigrants suing one at a time, that would bar immigration officials from carrying out certain policies.
It's a ruling that could also influence the court's upcoming decision in the so-called "Remain in Mexico" case.
Writing for the majority, Justice Samuel Alito pointed to the language in the relevant laws and said that, taken together, that language "generally prohibits lower courts from entering injunctions that order federal officials to take or to refrain from taking actions to enforce, implement, or otherwise carry out the specified statutory provisions."
Justice Sonia Sotomayor wrote a partial dissent, joined by Justice Elena Kagan and joined in part by Justice Stephen Breyer.
Sotomayor said that the majority opinion "elevates piecemeal dictionary definitions and policy concerns over plain meaning and context."
"I respectfully dissent from the Court's blinkered analysis, which will leave many vulnerable noncitizens unable to protect their rights," she wrote. The three justices, however, noted they thought the government should nevertheless prevail in the case but not for the reasons in the majority opinion.
The challenge, called Garland v. Gonzalez, was brought by migrants who brought a class action lawsuit targeting the government's practice of detaining certain immigrations for more than six months. The Supreme Court decided, in a separate case Monday, brought by an individual migrant, that the practice did not violate the relevant immigration law.
In the Gonzalez case, the Supreme Court was weighing whether a lower court had overstepped its authority, under the relevant immigration law, in granting the challengers class-wide relief in the lawsuit. The majority said it did, in a holding that will have major repercussions for how other immigration policies can be challenged in federal court in the future.
Alito wrote that the relevant immigration statute "does not preclude a court from entering injunctive relief on behalf of a particular alien" but that "injunctive relief on behalf of an entire class of aliens is not allowed because it is not limited to remedying the unlawful 'application' of the relevant statutes to "an individual alien.'"
Monday's ruling is a devastating blow to immigrant rights activists who have seen their options for quickly blocking immigration policies they oppose in court severely limited.
"The ramifications of the Court's errors should not be ignored," Sotomayor wrote. "Today's holding risks depriving many vulnerable noncitizens of any meaningful opportunity to protect their rights."
She noted the difficulties immigrants face navigating the "nation's labyrinthine immigration laws," and the "particularly daunting hurdles" migrants face once they're detained.
"It is one matter to expect noncitizens facing these obstacles to defend against their removal in immigration court. It is another entirely to place upon each of them the added burden of contesting systemic violations of their rights through discrete, collateral, federal-court proceeding," Sotomayor wrote.
"In a great many cases, the inevitable consequence of barring classwide injunctive relief will be that those violations will go unremedied, except as to the few fortunate enough to afford competent collateral counsel or to secure vigorous pro bono representation."
The majority's conclusion in the Gonzalez case could come into play in the so-called "Remain in Mexico" case the Supreme Court will be deciding later this term. In that case, Texas and other red states challenged the Biden administration's recission of a controversial Trump-era policy -- known as "Remain in Mexico" -- that forced migrants to stay to Mexico while they waited for immigration proceedings to move forward.
Texas had obtained lower court orders blocking the Biden administration from reversing the policy. Texas 'lawsuit was not filed on behalf of a specific class, but case has also not dealt the removal of an individual migrant. It's possible the Supreme Court in the weeks to come will rule against Texas in the Remain in Mexico case, with decision similar to the one handed down Monday in Gonzalez that says that the lower courts did have the authority to hear Texas' case in the first place. After the Supreme Court's oral arguments in the Remain in Mexico case, the justices asked for additional briefing from the parties addressing that procedural question.
CORRECTION: An earlier version of this story misspelled the name of the Supreme Court case Garland v. Gonzalez.
This story has been updated with additional details.