WASHINGTON — In a long and lively argument that touched on medical science and moral philosophy, the Supreme Court on Tuesday seemed ready to accept that at least some for-profit corporations may advance claims based on religious freedom.

Such a ruling would echo the court’s 2010 decision in Citizens United, which recognized free speech rights for corporations. But it would be only a first step in the court’s analysis of the lawfulness of a part of the Affordable Care Act that requires many employers to provide insurance coverage for contraception.

The justices seemed closely divided along ideological lines on other parts of the case. But Justice Anthony M. Kennedy, who probably holds the crucial vote, seemed frustrated with some of the Obama administration’s positions.

The questioning was sometimes technical but often unusually blunt and direct.

Justice Kennedy asked Solicitor General Donald B. Verrilli Jr., for instance, whether for-profit corporations “could be forced in principle to pay for abortions” and be powerless to object on religious grounds.