At the same time, federal law links many important perquisites to marital status, including Social Security survivor benefits, tax-free inheritance, spousal immigration rights and protections against mutual incrimination. All of these benefits are currently denied to same-sex couples, even those living in states that permit same-sex marriage or civil unions. But these same benefits could be conferred by federally recognized civil unions.

Yes, most gays are opposed to the idea that religious organizations could openly treat same-sex couples and opposite-sex couples differently, without fear of being penalized by the government. But we believe that gays can live with such exemptions without much difficulty. Why? Because most state laws that protect gays from discrimination already include some religious exemptions, and those provisions are for the most part uncontroversial, even among gays.

And while most Americans who favor keeping marriage as it has customarily been would prefer no legal recognition of same-sex unions at either the federal or the state level, we believe that they can live with federal civil unions  provided that no religious groups are forced to accept them as marriages. Many of these people may come to see civil unions as a compassionate compromise. For example, a PBS poll last fall found that 58 percent of white evangelicals under age 30 favor some form of legal same-sex union.

Linking federal civil unions to guarantees of religious freedom seems a natural way to give the two sides something they would greatly value while heading off a long-term, take-no-prisoners conflict. That should appeal to cooler heads on both sides, and it also ought to appeal to President Obama, who opposes same-sex marriage but has endorsed federal civil unions. A successful template already exists: laws that protect religious conscience in matters pertaining to abortion. These statutes allow Catholic hospitals to refuse to provide abortions, for example. If religious exemptions can be made to work for as vexed a moral issue as abortion, same-sex marriage should be manageable, once reasonable people of good will put their heads together.

In all sharp moral disagreements, maximalism is the constant temptation. People dig in, positions harden and we tend to convince ourselves that our opponents are not only wrong-headed but also malicious and acting in bad faith. In such conflicts, it can seem not only difficult, but also wrong, to compromise on a core belief.

But clinging to extremes can also be quite dangerous. In the case of gay marriage, a scorched-earth debate, pitting what some regard as nonnegotiable religious freedom against what others regard as a nonnegotiable human right, would do great harm to our civil society. When a reasonable accommodation on a tough issue seems possible, both sides should have the courage to explore it.