WASHINGTON (CNN) -

Some corporations have religious rights, a deeply divided Supreme Court decided Monday in ruling that certain for-profit companies cannot be required to pay for specific types of contraceptives for their employees.

The 5-4 decision on ideological lines ended the high court's term with a legal and political setback for a controversial part of President Barack Obama's healthcare reform law.

It also set off a frenzied partisan debate over religious and reproductive rights that will continue through the November congressional elections and beyond.

All five conservative justices appointed by Republican presidents ruled in favor of closely held for-profit businesses -- those with at least 50 percent of stock held by five or fewer people, such as family-owned businesses -- in which the owners have clear religious beliefs.

Tony Kolenc, a constitutional law professor at Florida Coastal School of Law, said it's important to point out that the decision applies to contraceptives, and he does not see it as a major blow to the Affordable Care Act, as some have suggested.

“I don’t think anyone is surprised by this decision today,” Kolenc said. “I think it’s a little bit partisan right now. If you look at what the court actually did, it’s not going to alter things all that much.”

Contraceptives or abortion?

Both corporations involved in Monday's ruling -- Conestoga Wood Specialties of Pennsylvania and Hobby Lobby, an Oklahoma-based arts-and-crafts retail giant -- emphasize their conscientious desire to operate in harmony with biblical principles while competing in a secular marketplace.

“I think this is a good thing for religious liberty,” Kolenc said. “Because if you think about what the administration is actually doing, they were telling these businesses, 'Regardless of your religious beliefs, you have to provide these particular contraceptives to your employees, even if they may cause an abortion and even if that is in violation of your moral code.'”

The companies argued the Affordable Care Act, also known as Obamacare, violates the First Amendment and other federal laws protecting religious freedom because it requires them to provide coverage for contraceptives like the "morning-after pill," which the companies consider tantamount to abortion.

"The companies in the cases before us are closely held corporations, each owned and controlled by members of a single family, and no one has disputed the sincerity of their religious beliefs," Justice Samuel Alito wrote in the majority opinion.

The four liberal justices appointed by Democratic presidents, including the high court's three women, opposed the ruling as a possible gateway to further religious-based challenges that limit individual choice and rights.

“There’s room for other cases to follow,” Kolenc said. “I doubt there is room for abuse. I think there will probably be other businesses who will follow in Hobby Lobby’s steps and perhaps object to other types of requirements the government puts on them.”

"Into a minefield"

In dissent Justice Ruth Bader Ginsburg wrote the court had "ventured into a minefield," adding it would disadvantage those employees "who do not share their employer's religious beliefs."

The practical result will likely be an administrative fix by the Obama administration that subsidizes the contraceptives at issue, said CNN political analyst Gloria Borger.

"So in terms of a real gap in medical coverage for these women, should they want it, I think what you are going to see is the government sort of picking up where Hobby Lobby would leave off," Borger said.

White House spokesman Josh Earnest signaled as much, telling reporters the Obama administration will work with Congress to ensure women affected by the ruling will continue to have coverage for contraceptives.

Obama believes that women "should make personal health care decisions for themselves, rather than their bosses deciding for them," Earnest said, adding that "today's decision jeopardizes the health of women who are employed by these companies."

The decision comes two years after the justices narrowly preserved the health care reforms known as Obamacare and its key funding provision in another politically charged ruling.