The controversy around the concept of religious liberty — whether in the form of birth control mandates resulting from the Affordable Care Act, or nondiscrimination lawsuits related to same-sex marriage — can seem like a straightforward conflict between retrograde religion and the progressive state.

But in truth the battle over religious liberty is a conflict within liberalism itself. In one corner are the liberal values of pluralism and tolerance. In the other are the liberal projects of egalitarianism and administrative efficiency. The quick and decisive defeat of Arizona's attempt to clarify its state version of the 1993 Religious Freedom Restoration Act (RFRA) is evidence that our increasingly monocultural elite class is inclined to resolve these conflicts in favor of its egalitarian goals. But, it should tread carefully.

The pluralism of the United States has allowed diverse religious charities, health-care institutions, schools, and universities to flourish. These institutions define their own priorities and their own missions. Yeshivas do not teach the New Testament. Catholic universities make their chapels available for weddings of students whose marriages will be conducted according to the faith, and only those marriages. Those priorities may seem obvious and unimportant to you, the very definition of parochial.

But when the administrative state barges in, this pluralism can take on far greater implications. The contraception mandate, for example, is premised on several ideas that are dear to the current egalitarian projects of liberalism. In particular, that artificial birth control is an essential component of ensuring a woman's autonomy. Therefore it ought to be a basic feature of every health-care plan, and furthermore it ought to be "free" for the end user, to eliminate any disincentives for using it.

The Catholic Church opposes any form of artificial contraception or manufactured sterility. For Catholics in health care, that means fertility and virility are not conditions that should be managed at will, but signs of health. To assist someone in artificially suppressing them is to assist them in a form of self-harm, even if they want it.

Even if we instituted a single-payer health-care system, the conflict would simply move to a higher and more dramatic level: Why does a government that defines health care one way act in partnership (through subsidies and reimbursements) with hospitals that define it in another way?

Faced with the dilemma, partisans of the egalitarian project define pluralism down. The free exercise of religion is reduced to "freedom of worship." You're allowed to believe whatever you want, but when you act in any way that touches public life, you must act according to the ideology of the state. This is a convenient way of defining freedom of conscience and free exercise of religion down to the very last things the liberal state would care to interfere in: what happens once a week at churches and what thoughts you may be thinking. In other words, diversity is okay so long as it remains behind closed doors and in your head. Why even bother with a First Amendment if religion is such a trivial phenomenon?

The bipartisan consensus that passed the Religious Freedom Restoration Act sought to avoid these conflicts by legally affirming America's historic tolerance of religious dissent and diversity. It demanded that if the government were to burden the conscience of religious believers, it must show evidence of a compelling interest and a lack of alternatives for achieving its goal.

But when the issue changed from the religious use of peyote to same-sex marriage, the debate ran much hotter because the principles of pluralism and egalitarianism were put into a conflict that could prove mortal to one or the other.

From the perspective of egalitarians, to let wedding vendors refuse business from gay and lesbian clients puts into question the whole principle of nondiscrimination, one that was used righteously in defeating an entire system of racial apartheid in the American South. This was a system that excluded blacks from entire arenas of commercial and social life, through law and terrorism. What good is the liberal state if it can't punish bigotry anymore? To the secular, religious scruples seem arbitrary. Limiting the reach of the law based on them seems to invite a kind of anarchy. The unscrupulous could make up new religious beliefs, thereby creating new exemptions and liberties, to hurt others.

For the pluralists, the refusal of a small minority of vendors to participate in particular wedding ceremonies — whether same-sex marriages or second marriages — is no different from other uncontroversial forms of discrimination. Perhaps the local print shop is happy to print a client's business card, but not his religious tracts. Or a barber wants to refuse service to a client over his politics. Unlike in the segregation-era South, the offended clients have other, more eager options in the market, and have no need to use the law to obtain what they sought in that market.

There may yet be legislative compromises that satisfy the demands of both sets of values. Perhaps RFRA-style laws can be worded to assure egalitarians that religious objections are limited to certain events and actions, and not directed at entire classes of fellow citizens. And health-care mandates can be recrafted to use public institutions, rather than religious ones, as the guarantor of egalitarian goals.

But let me enter a suggestion as a conclusion. Liberalism should have the confidence to tolerate institutions, even large ones, that have competing and contrary missions to those of the state. The very liberality of the managerial state is guaranteed by real diversity, not just of skin color and sexual preference, but of religion and values, too.

Real pluralism preserves the possibility of critique emerging within a liberal state. The interplay of individuals and diverse institutions encourages liberality and understanding at the ground level of citizenship — the gratitude for people very different from you who are still very solicitous of your needs. Whereas the strict ideological hen-pecking of the state creates a kind of existential dread, and intensifies the panic of the culture war — the fear that a loss on principle in one case is the loss of all power and recourse in the future. Legislators and jurists would do best to retain these two essential liberal values, by finding solutions that deftly avoid setting them against each other.