WASHINGTON – The Supreme Court ruled Monday that Congress cheated health insurance companies by reneging on a $12 billion promise made under the Affordable Care Act.

The decision represents the high court's views on Congress' power of the purse: Lawmakers cannot promise funding in legislation and then disavow that pledge.

Associate Justice Sonia Sotomayor wrote the 8-1 opinion on the basis of "a principle as old as the nation itself: The Government should honor its obligations."

Associate Justice Samuel Alito dissented, calling it "a massive bailout for insurance companies that took a calculated risk and lost."

Because insurers took considerable risks when they agreed to participate in Obamacare's marketplaces, the original 2010 law included limits on the amount of losses they could incur. But when the bill came due to cover some of those losses several years later, the government refused to pay.

Paul Clement, the former U.S. solicitor general representing the insurers, called it a $12-billion "bait and switch." But a federal appeals court ruled that Congress had the right not to appropriate the funds.

During oral argument in December, Chief Justice John Roberts said the insurers "would not have participated in the risk corridor program but for the government's promise to pay."

Added Associate Justice Stephen Breyer: "Why does the government not have to pay its contracts, just like anybody else?"

Since its passage, the Affordable Care Act championed by President Barack Obama has been the subject of countless legal challenges. The Supreme Court twice has upheld it by narrow votes and will hear a third major challenge next fall.

In addition, the justices will hear for the second time next week challenges from religious objectors that they should not have to provide free health insurance under the program for contraceptives. That case is one of 10 being argued by telephone because the court is not sitting during the coronavirus pandemic.