The nomination of a devoutly Catholic federal judge to fill the latest vacancy on the United States Supreme Court has brought back into the spotlight a question that has roiled American public life since the nation’s founding: What is the proper role of religion in our nation’s government?

Many people persist in thinking there’s an easy answer to that question. “None!” some say. Others insist that the US is a “Christian nation” and our government should reflect that fact.

In reality, the answer isn’t as simple as either of these answers implies.

The founders were well aware of the problematic nature of religion as it relates to the government. Europe’s post-Reformation history was fresh in their memories. In various contexts, Catholics, Lutherans, Calvinists, Anabaptists, and Jews had been persecuted and sometimes killed by government fiat. The framers tried hard to defuse the problem by enshrining in the Constitution (including its Bill of Rights) the principle of separation of church and state: no religious tests to hold public office; no establishment of a national church; and free exercise of religion for all.

By the standards of historical experience, it was an excellent effort. Any reasonable observer would agree that the United States has an exemplary record of protecting religious minorities, has been home to an extraordinary religious pluralism, and has avoided a widespread, ongoing, violent religious conflict of the kind that has plagued many other parts of the world.

But that doesn’t mean that the problem has been solved, once and for all. Our history has witnessed deadly clashes over religion (e.g., the Philadelphia Bible Riots of 1844) as well as government persecution of religious groups (e.g., Missouri’s 1838 Extermination Order against Mormons). Even if we optimistically believe that such religion-related violence is a thing of the past, softer forms of such conflict remain common. There have been numerous instances in recent years of vandalism directed against mosques, synagogues, and churches alike.

Determining exactly how the government ought to treat religion, moreover, remains a challenge. Complete neutrality is illusory. When government aid is available for social welfare programs and schools, and tax credits are offered for adoptions, educational expenses, or charitable donations, the line between “favoring religion” and “discriminating against religion” becomes hard to discern.

Sometimes there are difficult tradeoffs that must be made between religious freedom and public order. No one could reasonably claim that the late Justice Antonin Scalia was “anti-religious,” but he wrote the majority opinion against religious freedom claims in the 1990 Employment Division v. Smith case, which denied a religious exemption from the state’s controlled substances regulations.

So partisans on both sides of the religious divide need to be careful. It’s true that the “high wall” of separation introduced by the Supreme Court in the 1940s was rooted neither in the law or the historical experience of the American polity. Trying to eliminate religion from politics is a bad idea, in part because it’s impossible. At the same time, those who belong to the dominant religious group must guard against unwitting discrimination against minority views and practices. Finally, politicians and voters alike must avoid the temptation of using religion as a tool for political gain.

Following these guidelines will help, but, in the arena of church-state relations, dilemmas cannot be entirely avoided. In the 1870s, the Supreme Court effectively outlawed what had been a pillar of the Mormon faith, the practice of polygamy. It was deemed fundamentally incompatible with the values and institutions of American life. The Latter-Day Saints survived and thrived, but there’s no gainsaying the fact that this was a case of government intrusion into religion. The orthodox Christian who embraces both the sanctity of monogamous marriage and the inviolability of religious freedom will likely view the episode with some ambivalence.

In the 1830s, Alexis de Tocqueville found it remarkable how, in the American experience, the “spirit of religion” and the “spirit of freedom” were “intimately united.” Our continuing challenge is to continue to strike the balance that has characterized American political culture and preserved this unity. Our government should strive to create an environment that is favorable to religious belief and religious institutions, without favoring any particular religious view or body. The offices of government should be forbidden to neither agnostics nor believers, to neither secular Jews nor devout Catholics—to neither Ruth Bader Ginsburg nor Amy Coney Barrett.