WASHINGTON, DC (CBS News) — The Supreme Court on Wednesday upheld the Trump administration’s broad exemptions to employers who raise religious or moral objections to providing free birth control coverage, paving the way for more employers to opt out of a provision of the Obama-era health care law that has been at the center of a long-running dispute before the courts.

The court ruled 7-2 that the Department of Health and Human Services had the authority to carve out the exemptions to the Affordable Care Act’s contraceptive mandate, marking a win for the Trump administration and religious liberty. Justices Elena Kagan and Stephen Breyer joined the Supreme Court’s conservative justices in upholding the Trump administration’s statutory authority to exempt certain employers from the mandate, but did not join the majority opinion.

“After two decisions from this court and multiple failed regulatory attempts, the federal government has arrived at a solution that exempts the Little Sisters from the source of their complicity-based concerns — the administratively imposed contraceptive mandate,” Justice Clarence Thomas wrote for the majority, referencing Little Sisters of the Poor, the Catholic nonprofit involved in the case. “We hold today that the departments had the statutory authority to craft that exemption, as well as the contemporaneously issued moral exemption.”