The U.S. Supreme Court on Thursday rejected a Republican-led attempt to dismantle the entire Affordable Care Act, which provides health insurance coverage for more than 30 million Americans.

The court, voting 7-2, ruled that the challengers to the health insurance law do not have “standing”—the right to sue—because they failed to show the required past or future injury from enforcement of the act’s so-called individual mandate to purchase insurance. That penalty for lacking insurance was eliminated by Congress in 2017.