Washington — Supreme Court justices on Wednesday seemed sympathetic to a Missouri church that claimed its exclusion from a state playground improvement program was a violation of constitutional rights. Even some of the court’s liberal justices were concerned that the state had drawn too hard a line in saying that the fact a day care and preschool was controlled by Trinity Lutheran Church in Columbia was reason enough to bar it from the program.

“You’re denying one set of actors because of their religion,” Justice Elena Kagan told a lawyer for the state. In such a case, she said, the state’s interests “have to rise to an extremely high level.”

Missouri’s state constitution, similar to those of a majority of states, directs that “no money shall ever be taken from the public treasury, directly or indirectly, in aid of any church, sect, or denomination of religion.” That should mean the state should not be forced to write out a check to “Trinity Lutheran Church,” said James Layton, a Jefferson City lawyer who was representing the state.

But he seemed to face an uphill battle in defending the exclusion of church groups from a program with only a secular goal — making playgrounds safer — and for which Trinity would have been otherwise approved.

The hourlong argument suggested justices could coalesce around a narrow ruling that affected programs that are generally applicable to the public, provided only secular benefits promoting health and safety and perhaps forbade religious discrimination, which was raised as a concern by some justices but was not an issue in Trinity’s case.

The case has been complicated by an announcement last week by the state’s new Republican governor, Eric Greitens, that he was reversing the policy that denied Trinity’s application in 2012 and that churches would be eligible to participate. But lawyers for both sides told the court that Greitens’ actions did not make the case moot, because the policy could be changed in the future.

The case could provide a quick test of whether new Justice Neil Gorsuch will, as expected, follow in the footsteps of the man he replaced, the late justice Antonin Scalia. There was no sign that the court’s conservatives would side with the state.