The Rev. Rob Schenck of Faith and Action, center, speaks in front of the Supreme Court with Raymond Moore and Patty Bills, both also of Faith and Action, during a news conference Monday praising the ruling by the court’s conservative majority that allows prayer at meetings of local legislative bodies. (Carolyn Kaster/AP)

A divided Supreme Court ruled Monday that legislative bodies such as city councils can begin their meetings with prayer, even if it plainly favors a specific religion.

The court ruled 5 to 4 that Christian prayers said before meetings of an Upstate New York town council did not violate the constitutional prohibition against government establishment of religion; the justices cited history and tradition.

“Ceremonial prayer is but a recognition that, since this Nation was founded and until the present day, many Americans deem that their own existence must be understood by precepts far beyond the authority of government,” Justice Anthony M. Kennedy wrote for the court’s conservative majority.

The ruling reflected a Supreme Court that has become more lenient on how government may accommodate religion in civic life without crossing the line into an endorsement of a particular faith. All nine justices endorsed the concept of legislative prayer, with the four dissenters agreeing that the public forum “need not become a religion-free zone,” in the words of Justice Elena Kagan.

But there was sharp disagreement after that, and the majority ruling could encourage public bodies to give more leeway to religious expression in their ceremonial prayers and less deference to the objections of religious minorities.

The court’s five conservatives said legislative prayers need not be stripped of references to a specific religion — the prayers at issue often invoked Jesus Christ and the resurrection — and said those given the opportunity to pray before legislative meetings should be “unfettered” by what government officials find appropriate.

“Absent a pattern of prayers that over time denigrate, proselytize, or betray an impermissible government purpose, a challenge based solely on the content of a particular prayer will not likely establish a constitutional violation,” Kennedy wrote.

He was joined by Chief Justice John G. Roberts Jr. and Justices Antonin Scalia, Clarence Thomas and Samuel A. Alito Jr.

Kagan’s dissent was both narrow — the town could have remedied its problems by finding more religiously diverse prayer-givers, she said — and broad. The First Amendment’s promise, she wrote, is that “every citizen, irrespective of her religion, owns an equal share in her government.”

Justices Ruth Bader Ginsburg, Stephen G. Breyer and Sonia Sotomayor joined her.

The decision split the court along its usual ideological divide and, to a lesser extent, by religion. All members of the majority are Catholic, as is Sotomayor. The other dissenters are Jewish.

The case involved the New York town of Greece, just outside Rochester, where the council regularly opened its meetings with a prayer delivered by someone from the community. The speakers were recruited from local houses of worship, which were overwhelmingly Christian.

In fact, every meeting from 1999 to 2007 opened with a Christian prayer, and even after two of the town’s residents filed a lawsuit, only a handful of non-Christians have delivered the invocation.

A panel of the U.S. Court of Appeals for the 2nd Circuit found that “the town’s prayer practice must be viewed as an endorsement of a particular religious viewpoint” because the town had not reached out to a more diverse group of prayer-givers or made clear that the prayers did not represent the town’s beliefs.

The Supreme Court decided 30 years ago that state legislatures may begin sessions with an invocation. But the new case asked whether there might need to be different rules for local council meetings, where citizens often come to ask for favorable official action.

The town residents who objected to the prayer practice, Susan Galloway and Linda Stephens, also argued that the court’s 1983 decision in Marsh v. Chambers authorized only inclusive, nonsectarian prayers to a “generic God.”

Kennedy began by referring to history: The same founders who wrote the First Amendment — with its prohibition on the establishment of a government religion but also protections for religious liberty — provided money for congressional chaplains, he said.

“Legislative prayer has become part of our heritage and tradition, part of our expressive idiom, similar to the Pledge of Allegiance, inaugural prayer, or the recitation of ‘God save the United States and this honorable Court’ at the opening of this Court’s sessions,” he wrote.

And he said there was no evidence that Greece town council members “allocated benefits and burdens based on participation in the prayer.”

The court’s majority split on how to judge whether prayers amount to coercion of nonbelievers.

“The analysis would be different if town board members directed the public to participate in the prayers, singled out dissidents for opprobrium, or indicated that their decisions might be influenced by a person’s acquiescence in the prayer opportunity,” Kennedy wrote in a part of the opinion joined only by Roberts and Alito.

Thomas and Scalia differed. They said that to the extent coercion is relevant to whether there is a violation of the Constitution’s establishment clause, “it is actual legal coercion that counts.” Peer pressure, they said, is not enough.

Thomas, speaking only for himself, again questioned whether the establishment clause even applies to state and local governments. He allowed that as an initial matter, it “probably prohibits Congress from establishing a national religion.”

Kagan said Greece’s policy violates the norm of religious equality — “the breathtakingly generous constitutional idea that our public institutions belong no less to the Buddhist or Hindu than to the Methodist or Episcopalian.”

She said town hall meetings are different from sessions of legislatures or Congress. They are “occasions for ordinary citizens to engage with and petition their government, often on highly individualized matters.” Such meetings require more sensitivity to the prayers offered before a diverse audience, she said.

But in Greece, she wrote, “month in and month out for over a decade, prayers steeped in only one faith, addressed toward members of the public, commenced meetings to discuss local affairs and distribute government benefits.”

She compared it — using the text of some of the prayers offered before the council’s meetings — to the idea of a judge inviting a minister to open a hearing with a prayer about “the saving sacrifice of Jesus Christ” or an election official reciting the Lord’s Prayer before opening the polls.

“I would hold that the government officials responsible for the above practices — that is, for prayer repeatedly invoking a single religion’s beliefs in these settings — crossed a constitutional line,” Kagan wrote. “I have every confidence the Court would agree.”

The decision was not unexpected. The court’s precedent in Marsh — in which the justices said Nebraska had not violated the Constitution by employing a Presbyterian minister for 16 years to lead the legislature in prayer — paved the way.

Still, those who favor a strict separation of church and state said Monday’s decision was an expansion.

“The rule announced by the Court today authorizes elected officials or clergy to give sectarian prayers in the name of Jesus, Hashem, Allah or any other deity before Congress, state legislatures, or local town boards,” the Anti-Defamation League said in a statement. “The religiously divisive implications of this new rule are troubling in any of these contexts, however it is particularly disturbing at the local level.”

But David Cortman, senior counsel for the Alliance Defending Freedom, praised the ruling.

“Opening public meetings with prayer is a cherished freedom that the authors of the Constitution themselves practiced,” he said. “Speech censors should have no power to silence volunteers who pray for their communities just as the Founders did.”

Those divisions were apparent on the court as well.

Alito wrote a concurring opinion just to respond to Kagan. He said he was troubled by her “rhetoric and its highly imaginative hypotheticals.”

He said that if what Kagan perceives as Greece’s constitutional problems could be solved simply with more nonsectarian prayers and greater religious diversity, “the dissent’s objection, in the end, is really quite niggling.”

Kagan responded that if Alito thinks her objection is “really quite niggling,” that “says all there is to say about the difference between our respective views.”

The case is Town of Greece v. Galloway.