The Supreme Court ruled Monday that opening prayers at town meetings do not violate the Constitution, even if they are specifically Christian prayers.

The content of prayers is not important as long as local officials make good-faith efforts to be inclusive, the Supreme Court said in a 5-4 decision.

“The inclusion of a brief, ceremonial prayer as part of a larger exercise in civic recognition suggests that its purpose and effect are to acknowledge religious leaders and the institutions they represent, rather than to exclude or coerce nonbelievers,” Justice Anthony Kennedy said, writing for the majority.

The ruling, which is a victory for the town of Greece, N.Y., was consistent with a 1983 ruling that upheld opening prayers in the Nebraska legislature on the grounds that prayer is part of the nation’s fabric and not in violation of the First Amendment.

Justice Elena Kagan said in a dissent that this case differs from the 1983 decision because “Greece’s town meetings involve participation by ordinary citizens, and the invocations given—directly to those citizens—were predominantly sectarian in content.”

Write to Nolan Feeney at nolan.feeney@time.com.