The U.S. Justice Department on Tuesday faced a skeptical U.S. Supreme Court over arguments that the government had no obligation to pay $12 billion in losses incurred by insurance companies that agreed to participate in a federal program to provide health insurance for high-risk individuals through the Affordable Care Act.

The Affordable Care Act established a “risk corridors” program stating that the government “shall pay” insurers a portion of their losses for three years beginning in 2014 if their costs were higher than anticipated. Insurers were obligated to pay a portion of any savings into the program if costs were lower than expected.