The Supreme Court split during a tense oral argument Wednesday that pitted religious liberty against women’s access to contraceptive coverage, raising the possibility that the now eight-member court would deadlock on a key component of the Affordable Care Act.

The court’s four liberals seemed to agree that the Obama administration had offered an acceptable compromise for religiously affiliated organizations such as universities, hospitals and charities that want to be freed from the obligation to supply their female employees with no-cost contraceptive coverage, which they say violates their religious beliefs.

The accommodation requires the groups to tell the government they object, then allows the government to work with the groups’ insurers to provide the coverage without the organization’s involvement or financial support.

But the justice who could provide a fifth vote in the administration’s favor, Anthony M. Kennedy, expressed doubts.

He told Solicitor General Donald B. Verrilli Jr. that it sounded as if the challengers were right in their allegation that the government was “hijacking” their insurance plans to provide contraceptive coverage rather than finding a way to provide the coverage without involving the groups at all.

The hearing provided a vivid illustration of the difficulty the court — without Justice Antonin Scalia, who died last month — might have putting together the necessary five-member majority to decide its most important cases.

In this case, it would mean the national law that has transformed health-care coverage would be implemented differently depending on where the organization and its employees are located.

An inability to decide the case would mean the lower courts’ decisions would remain in place. The mandate has been upheld by eight of the nation’s regional appeals courts that have decided the issue and overturned in one.

And along with the contraceptive controversy, cases involving abortion, affirmative action and President Obama’s deportation plan all await decisions from the divided, eight -member court.

Kennedy’s comments at oral arguments are not always indicative of his eventual votes, and the justices have months to come up with a compromise that could attract five members. It seems likely the court will work hard at that, but it could also choose to rehear the case with a full court, although no one knows when that would be.

Women’s groups and the Obama administration hope Kennedy will be the fifth vote on their side; he seemed content with groups receiving an accommodation in a case two years ago.

But on Wednesday his questions and comments were more in line with the court’s skeptical and outspoken conservatives, Chief Justice John G. Roberts Jr. and Justice Samuel A. Alito Jr.

Said Alito, “This is a case in which a great array of religious groups — and it’s not just Catholics and Baptists and evangelicals but Orthodox Jews, Muslim groups, the Church of Jesus Christ of the Latter-day Saints, an Indian tribe, the Church of Lukumi Babalu Aye — have said that this presents an unprecedented threat to religious liberty in this country.”

Roberts told Verrilli that the administration’s compromise still required groups to take actions that they think violate their beliefs. “They think that complicity is sinful,” Roberts said.

Washington lawyer and former George W. Bush administration solicitor general Paul D. Clement, representing an organization of Catholic nuns called Little Sisters of the Poor that cares for the elderly, said the government has not given the group a meaningful way to opt out.

“My clients would love to be a conscientious objector, but the government insists that they be a conscientious collaborator,” Clement said in his closing. “There is no such thing.”

The liberal justices were equally insistent that the administration had found a way to recognize religious beliefs and provide women with the cost-free, preventative care that the law requires.

“As in all things, it can’t be all my way,” Justice Ruth Bader Ginsburg told Clement. “There has to be an accommodation, and that’s what the government tried to do.”

Justice Stephen G. Breyer sounded a similar note.

“Sometimes when a religious person who’s not a hermit or a monk is a member of society, he does have to accept all kinds of things that are just terrible for him,” Breyer said. He added: “Think of the people who object to laws protecting blasphemy. Think of the people who object to shoveling the snow in front of the walk that will lead to the abortion clinic. Think of the Christian Scientists who know when they report the accident, the child will go to the hospital, or the adult, and receive medical care that is against their religion.”

Wednesday’s case is something of a follow-up to 2014’s decision in Hobby Lobby v. Burwell that relieved religiously objecting owners of certain businesses from providing contraceptive coverage to their employees.

As in Hobby Lobby, the complaint is that the contraceptive mandate implemented by the Department of Health and Human Services violates the Religious Freedom Restoration Act.

The RFRA says the government must have a compelling reason for laws and programs that substantially burden religious beliefs, and even then government must prove that the law is the least burdensome way of achieving its goal.

In Hobby Lobby, Alito wrote in the majority opinion and Kennedy reiterated in a concurrence that the government had erred in not providing an accommodation for the owners.

But even the form-signing accommodation offered by the administration to the groups is not enough, the religious groups say. It would still implicate them in sin, they say, and they would face ruinous fines if they refused to comply. They want to be included under the same blanket exemption from providing the coverage that the government has extended to churches and other purely religious groups.

Clement said the government used the wrong standards in deciding which groups got the exemptions and which did not. His fellow counsel Noel Francisco told the court that the government could not prove providing the coverage was a compelling need, because it exempted churches and large plans that were grandfathered in with the law.

Justice Elena Kagan said that did not prove his point. “There’s not a law in town that doesn’t have exceptions,” she said.

And there is a long tradition that churches are different, she said. “If you’re saying that every time Congress gives an exemption to churches and synagogues and mosques that they have to open that up to all religious people, then the effect of that is that Congress just decides not to give an exemption at all.”

Kennedy also signaled that was a problem. “It’s going to be very difficult for this court to write an opinion which says that once you have a church organization, you have to treat a religious university the same,” he said.

Roberts and Alito said women could receive contraception in other ways — the federal government could provide it, or they could buy insurance elsewhere, even through one of the exchanges under the Affordable Care Act.

Roberts said that would be taking the burden from the religious organizations to sign something they believe implicates them in sin.

But Verrilli said such contraceptive-only plans do not exist and are not allowed by law.

But more than that, he said, it would be disrupting the scheme that Congress devised.

“Even in that hypothetical world, that is not equally effective at achieving the government’s interest, because the whole point of this provision is that you get this care from your regular doctor as part of your regular health care without any barriers, including any co-pay barriers” he said.

The cases accepted are Zubik v. Burwell, Priests for Life v. Department of HHS, Roman Catholic Archbishop of Washington v. Burwell, East Texas Baptist University v. Burwell, Little Sisters of the Poor Home for the Aged v. Burwell, Southern Nazarene University v. Burwell and Geneva College v. Burwell.