WASHINGTON — The Supreme Court struggled Wednesday to endorse the centuries-old tradition of prayer at government meetings in the face of increased secular sensitivity.

After listening to their court marshal intone, "God save the United States and this honorable court," the justices tried to justify a New York town's practice of having mostly Christian clergy deliver sometimes strikingly sectarian prayers.

A majority of conservative justices clearly didn't want governments to get more involved in parsing which prayers are OK and which go too far toward endorsing one religion or coercing those in attendance. That bodes well for the town, which defended its practice based on more than two centuries of U.S. history.

But the case, Town of Greece v. Galloway, appeared to be a difficult one for several justices. They sought to balance that lengthy history against the town's often explicit prayers, and they worried that strict guidelines on prayer-givers -- such as those used by Congress and many state legislatures -- might be worse than the town's anything-goes policy.

"Part of what we are trying to do here is to maintain a multi-religious society in a peaceful and harmonious way," Justice Elena Kagan said near the conclusion of the hour-long argument. "And every time the court gets involved in things like this, it seems to make the problem worse rather than better."

While it has upheld the concept of legislative prayer, most recently in a 1983 case involving the Nebraska legislature, the case from Greece (pop. 94,000) in Upstate New York presented the justices with a new twist: mostly Christian clergy delivering frequently sectarian prayers before an audience that often includes people with business to conduct.

While that concerned several liberal justices, such as Kagan and Justice Sonia Sotomayor, the potential solutions struck most of them as worse. Justice Anthony Kennedy, who could be the swing vote, worried that enforcing standards for clergy to follow "involves the state very heavily in the censorship and the approval or disapproval of prayers."

The legal tussle began in 2007, following eight years of nothing but Christian prayers in the town outside Rochester. Susan Galloway and Linda Stephens, a Jew and an atheist, took the board to federal court and won by contending that its prayers aligned the town with one religion. Their brief to the high court is replete with video clips of Christian clergy referring to Jesus, Christ and the Holy Spirit.

Once the legal battle was joined, town officials canvassed widely for volunteer prayer-givers and added a Jewish layman, a Wiccan priestess and a member of the Baha'i faith to the mix.

But while those groups might be satisfied, justices said, virtually no prayer would satisfy everyone, leaving the court little option but to remove prayer entirely from government meetings -- something they clearly did not want to do.

"Give me an example of a prayer that would be acceptable to Christians, Jews, Muslims, Buddhists, Hindus. Give me an example of a prayer -- Wiccans, Baha'i," Justice Samuel Alito directed Douglas Laycock, the attorney representing Galloway and Stephens.

"And atheists," Chief Justice John Roberts chimed in.

"Throw in atheists, too," Justice Antonin Scalia said.

The justices didn't seem satisfied with other potential compromises, such as a multi-religious rotation of clergy or separating board meetings into separate business and public forums. But they kept returning to what many considered the worst scenario: governments policing prayers.

"Your position is that town councils like Greece can have prayers if they are non-provocative, modest, decent, quiet, non-proselytizing. That's your position?" Kennedy asked Laycock, somewhat incredulously.

The court's 30-year-old precedent, Marsh v. Chambers, upheld the Nebraska legislature's funding of a chaplain who delivered daily prayers. Chief Justice Warren Burger ruled then that such prayers were "part of the fabric of our society." The decision prohibited only those prayers that take sides by advancing or disparaging a particular religion.

Thomas Hungar, who represented Greece in court, argued that its mix of prayer-givers was less sectarian and less coercive than Nebraska's use of a single paid chaplain. But he based much of his argument on the long history of legislative prayer, which didn't sit well with some justices.

"The essence of the argument is 'We've always done it this way,' which has some force to it," Kennedy said. "But it seems to me that your argument begins and ends there."

Since Marsh, backers of church-state separation have made modest gains. In 1984, Justice Sandra Day O'Connor's "endorsement test" established that every government practice must be judged to determine whether it endorses one religion. In 1989, the court ruled that a Christmas crèche display on a courthouse staircase went too far by endorsing Christianity and brought forth O'Connor's "reasonable observer" test. O'Connor was in court for Wednesday's arguments.

The current court, with its 5-4 conservative tilt, agreed to consider the case following a federal appeals court's ruling against the town. Judge Guido Calabresi of the 2nd Circuit Court of Appeals said its actions "virtually ensured a Christian viewpoint" and featured a "steady drumbeat of often specifically sectarian Christian prayers."

Galloway and Stephens say they have felt "isolated, embarrassed and humiliated" at sparsely attended town board meetings because they do not participate in the prayers. "Pairing coercion with sectarian prayers makes the town's practice doubly unconstitutional," their brief says.

The two women note that just 76% of the U.S. population identifies as Christian. "A quarter of the population — nearly 89 million Americans — cannot be dismissed as hecklers," they argue.

The case has attracted more supporting briefs than any other on the court's 2013-14 docket. The town enjoys a 2-to-1 advantage in backers, including 34 U.S. senators and 85 House members, nearly all Republicans.

To the chagrin of the challengers, the Obama administration came down forcefully on the town's side — most notably because both houses of Congress have opened with prayers since 1789.

"We had a responsibility, in the interests of the United States, to ensure that we do what we can to protect the legitimacy and constitutionality of that long-established practice," Solicitor General Donald Verrilli said in a recent interview with the website Scotusblog.