To understand why religious freedom matters, put yourself in the position of someone who is part of a minority faith tradition in a town or nation that overwhelmingly adheres to a different creed. Then judge public practices by how they would affect the hypothetical you.

This act of empathy helps explain why religious liberty in the United States is such a gift. It is based, as Supreme Court Justice Elena Kagan wrote in her dissent to Monday’s decision on public prayer, on “the breathtakingly generous constitutional idea that our public institutions belong no less to the Buddhist or Hindu than to the Methodist or Episcopalian.”

Religious liberty will not disappear because of the court’s 5-to-4 ruling that the government of Greece, N.Y., can begin its town board meetings with prayers — even though, as Kagan put it, “month in and month out for over a decade,” they were “steeped in only one faith,” Christianity.

But the court majority not only failed the empathy test but also lost the opportunity Kagan offered to find a balance that would both honor religion’s role in American public life and safeguard the rights of those whose faith commitments diverge from the majority’s.

The facts of the case are straightforward. As Justice Stephen Breyer noted in his own dissent, from 1999 to 2010, at more than 120 of Greece’s town board monthly meetings, only four opening prayers were delivered by non-Christians. The four exceptions, Breyer pointed out, all “occurred in 2008, shortly after the plaintiffs [in the case] began complaining about the town’s Christian prayer practice.”

The court ruled that the government of Greece had not violated anyone’s rights. “Ceremonial prayer,” Justice Anthony Kennedy wrote for the majority, “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 to alter or define and that willing participation in civic affairs can be consistent with a brief acknowledgment of their belief in a higher power, always with due respect for those who adhere to other beliefs.”

The town was justified, Kennedy argued, in drawing on clergy from houses of worship within its boundaries, which happened to be Christian. Greece’s non-Christians worship at congregations outside its borders.

For Kagan, this was an inadequate rationale, and she asked the essential questions: Would Christians living in a predominantly Jewish town feel their rights were protected if all public functions were presided over by a rabbi leading Jewish prayers? “Or assume officials in a mostly Muslim town,” she suggested, “requested a muezzin to commence such functions, over and over again, with a recitation” of a traditional Muslim blessing.

Nonbelievers (and others uneasy with any link between religion and government) might fairly contend that putting an end to all such public religious invocations is the simplest solution to these difficulties. But Kagan was seeking a middle way. She thus rejected “a bright separationist line.” A town hall, she said, “need not become a religion-free zone.” Instead, “pluralism and inclusion . . . can satisfy the constitutional requirement of neutrality.”

And in insisting on the importance of bringing in minority religious voices, you might say that Kagan took faith more seriously than did Kennedy. Religious expressions can never be merely ceremonial, she wrote, because they are “statements of profound belief and deep meaning.” Yes, they are.

In the years since the court’s 1962 decision banning government-directed prayer in public schools, we have engaged in a fierce culture war over the role of religion in our public institutions. The school prayer decision has properly stood because it sought to protect against a form of government coercion. But friends of religion have charged that driving all vestiges of faith from every other corner of the public square was itself exclusionary behavior.

Kagan’s pluralism principle would avoid this by allowing citizens of all faiths to be heard, and ways could be found to apply it to nonbelievers. It lays the groundwork for a compromise that will be imperative as immigration and declining affiliation render our country more religiously diverse. Religion would continue to have a place in our public institutions, but they would have the obligation to respect differences over “profound belief and deep meaning.”

In contrast to a legal regime insufficiently alive to the rights of minorities and dissenters, Kagan’s approach would provide religion with a public role at once more stable and more sustainable. Its day will come.

Read more from E.J. Dionne’s archive, follow him on Twitter or subscribe to his updates on Facebook.