PITTSBURGH (KDKA) — The United States Supreme Court ruled on Wednesday in a 7 to 2 decision that the Trump administration may carve out broad exceptions when it comes to employee health insurance for contraceptives.

It was a loss for Pennsylvania Attorney General Josh Shapiro, who brought the lawsuit.

Under former President Barack Obama, all employers, except religious institutions, had to offer contraceptives to employees.

President Donald Trump changed that to allow any employer, based on religious beliefs, to deny contraceptive coverage. That led state Attorney General Shapiro to sue.

“It would have allowed any CEO for whatever their ‘moral’ beliefs were to deny women employees access to contraception,” Shapiro told KDKA’s Jon Delano on May 5, the day before the case was argued in the Supreme Court. “We fought back. We filed a lawsuit.”

But with two liberals — Justices Elena Kagan and Stephen Breyer — joining the five conservatives, the Supreme Court rejected Shapiro’s argument, saying the Affordable Care Act allows the administration in power to craft religious exemptions as they wish.

“This case is about the fundamental First Amendment right of all Americans’ religious liberty,” says former Allegheny County councilwoman and attorney Heather Heidelbaugh.

Heidelbaugh, the Republican candidate for Attorney General, supports the decision.

“We want people to be able to live their faith,” she says.

So what if a local employer denies contraception coverage to an employee here?

“They absolutely can come to us,” says B.J. Leber, president and CEO of Adagio Health. “In fact, that is why Adagio Health was created 50 years ago. There’s a federally funded program called Title X, which provides family planning to anybody who needs family planning regardless of income.”

Leber says Adagio Health already provides free or low-cost contraceptives to 40,000 women in the region.

And if a woman needs contraceptives for medical reasons, not birth control, that is still covered under insurance, no matter her employer’s religious views.

The Supreme Court sent the case back to the lower courts, leading Shapiro to say the fight continues.

Heidelbaugh says that’s a waste of taxpayer dollars.

Shapiro released this statement Wednesday afternoon:

“While I am disappointed with much of the majority opinion, I am pleased the Court allowed our challenge to the Administration’s overly broad rules to proceed. We now return to the lower courts to address whether the exemptions are arbitrary and capricious. This fight is not over.

“Nobody should get in between a woman and her doctor. No employer should deny their employees medicine based only on the employer’s personal beliefs. No worker should worry about how they’ll pay for their prescriptions or whether the next doctor’s visit will be covered.

“Our case was never about requiring religious groups to provide contraception — organizations like the Little Sisters are already exempt. Our case is about an overly broad rule that allows the personal beliefs of CEOs to dictate women’s guaranteed access to contraceptive medicine.

“Since the day they took office, the Trump Administration has been dead set on hacking away at the Affordable Care Act. So long as I serve the people of Pennsylvania, I will continue to fight for people’s right to healthcare and reproductive justice. As I said to President Trump when I filed this lawsuit two years ago, I will see you in court – that statement still stands and I will continue this battle on behalf of women everywhere.”