Last week’s Supreme Court ruling extending employment-discrimination protections to LGBT Americans — in a 6-to-3 decision, with a conservative justice writing the majority opinion and another conservative, the chief justice, joining it — was a milestone. Bostock v. Clayton County, Georgia overjoyed many progressives and LGBT advocates, who will redouble their push for the Equality Act, a bill that passed the house in May 2019 that would ban anti-LGBT discrimination more broadly. The decision horrified many social and especially religious conservatives, who see a net of cultural and legal intolerance tightening around them.

“It is hard to overstate the magnitude of this decision, and the size of the loss to religious and social conservatives,” the Christian blogger Rod Dreher wrote. “There is no safe place to hide from what’s coming.”

Now might seem like a particularly unsuitable moment to suggest that the two sides make a deal. But we believe an opportunity beckons. In an era when Americans are deeply polarized and angry at one another, convinced that those on the other side politically are wicked and unreasonable, there is a better way forward on the fraught issue of gay rights and religious liberty — a path that could build on the protections the Supreme Court has provided LGBT Americans, while affording important new safeguards to those who believe the Court’s decision will pressure religious institutions to abandon their views on sexual ethics. It holds out the prospect of a positive-sum resolution for both sides, with each side getting something it considers essential and neither side getting everything it wants.

In its decision, the Supreme Court held that the 1964 civil rights law’s prohibition of sex discrimination extends to employees who are fired for being gay or transgender, but it did not address an array of other LGBT civil rights concerns. High on that list are conflicts over so-called public accommodations. These are the emotionally charged cases where a merchant, citing religious principles, declines service to, for example, a same-sex couple seeking photography or catering for a same-sex wedding. Such merchants typically say they gladly employ LGBT people and do business with them, but they cannot in good conscience participate in an event that violates their religious principles. Similar issues arise with religious charities and schools that object, for instance, to facilitating adoptions by same-sex couples or providing married-couple housing for same-sex spouses. Of course, the LGBT side disagrees, arguing that nondiscrimination protection means little if it allows anyone with a religious objection to opt out.

Both in its decision this week and in its 2018 holding about a Colorado bakery that refused to bake a wedding cake for a same-sex couple, the Supreme Court indicated that it is not ready to weigh in on the contentious issue of religious refusals. In Congress, progressives are all-in for the Equality Act, which would outlaw all forms of discrimination against LGBT people and also override religious exemptions. But that bill frightens many religious organizations and, because it has no Republican support, it will not get past a Senate filibuster anytime soon.

Both sides, then, have unfinished agendas. LGBT advocates want broader civil rights protections than the Supreme Court’s relatively narrow decision provided. Religious-liberty advocates want some carve-outs for faith-based institutions. Both sides could — and indeed might — hope to win in the courts. But that strategy is unpredictable and risky, since the Supreme Court is closely divided and protective of both LGBT civil rights and religious liberty. In any case, waiting for the courts would take years, if not decades, during which friction would only grow.

There is an alternative. In December, the American Unity Fund and a consortium of mostly conservative religious groups unveiled the Fairness for All Act, an LGBT nondiscrimination bill that seeks to model a negotiated compromise. The bill would provide extensive nondiscrimination protections, but, unlike the Equality Act, it couples them with carefully defined carve-outs for religious charities and schools and for retailers with fewer than 15 employees.

The act was immediately denounced by activists and organizations on both the pro-LGBT left and the religious right, often in hyperventilating language. No House Democrat agreed to join the eight Republicans who co-sponsored it. Realistically, the Fairness for All Act is going nowhere in the House, just as the Equality Act is going nowhere in the Senate.

So why do we think it deserves a closer look now?

Start with what at first glance may seem to be a curious fact. According to polling conducted last year by the Public Religion Research Institute, 77 percent of Utahans support nondiscrimination protections for LGBT Americans, second only to 81 percent in New Hampshire.

Why the high enthusiasm for gay rights in conservative, heavily Mormon Utah? No mystery. In 2015, LGBT -rights advocates, the Church of Jesus Christ of Latter-day Saints and the state’s Republican leaders agreed on a new law combining LGBT protections with carefully tailored religious exemptions. The process of negotiating the deal and building trust forged a durable consensus. In fact, just a few months ago, Utah enacted a rule barring harmful “gay conversion” therapy for minors, with the support not only of LGBT advocates but also of the Mormon hierarchy.

In today’s Trumpified world, Americans tend to think that politics is a brutal Punch and Judy show, and that compromise is a surrender of principles. But when the politics of compromise is in good working order, it builds new alliances, develops new solutions, and turns conflict into cooperation. Utah provided one example. The Fairness for All Act holds out a similar opportunity at the federal level, with at least three substantial payoffs.

First, the bill shows how seeking compromise makes seemingly nonnegotiable moral differences tractable to political bargaining. Unlike the Equality Act, which expands protections for the LGBT side while narrowing existing protections for the religious side, the Fairness for All bill gives each side a win compared to where it is now. LGBT people get those important civil-rights protections, more swiftly and surely than the courts could deliver them. More than that, as in Utah, they get the buy-in and active support of an influential swath of the conservative religious community, something that has never been on offer before and that has the potential to change the LGBT-religious conversation in all kinds of constructive ways. For LGBT Americans, locking in religious groups’ support for nondiscrimination protections would be a political game-changer — one that might lead to breakthroughs on other fronts.

Religious interests get assurances that religious-affiliated organizations like schools and charities can hire and teach according to their beliefs and, importantly, that faith-based groups can keep their nonprofit status while maintaining their beliefs and practices concerning marriage, family and sexuality. It is significant that the Council for Christian Colleges & Universities, an influential higher education association of more than 180 Christian institutions, has endorsed Fairness for All.

Second, the bill demonstrates that compromise is not necessarily just about splitting differences. Often, compromise is a creative, generative force, expanding the political frame and inventing new policy approaches to break old deadlocks. In their search for traction on the particularly thorny issue of faith-based adoption and foster-care agencies, the Fairness for All negotiators devised an innovative approach that lets individuals, rather than governments, pay placement agencies. In their quest to sweeten the pot for both sides, they agreed to bar companies from firing employees based on what they say about marriage and sexuality outside the workplace — a type of free-speech protection that currently does not exist for either side under federal law.

Most important of all is the lesson Utah teaches. Politics can paralyze and polarize, yes. But politics can also conciliate and heal, with effects that radiate farther and last longer than the terms of any one piece of legislation. By creating new constituencies for both sides of a bargain, political accommodation can change hearts and minds, not just law — a stronger foundation for civil rights and religious liberties than any statute or judicial decision alone can provide. As the LDS Church leadership said in endorsing the Utah compromise, security lies in reciprocity: “In a game of total victory, we all lose.”

There is one other thing that dialogue, negotiations and accommodation can provide that the culture-war mentality doesn’t offer: the chance to widen the aperture of understanding between people of different life experiences and perspectives, and to learn from others. That has certainly been the experience in our own friendship, between a gay atheist and a straight Christian.

Our point is not to endorse all the specifics of the Fairness for All Act, much less to predict its enactment. Our point is that the bill provides a starting place for negotiation. It opens the conversation the country needs to have now, when fracture and polarization seem to be reaching unsustainable levels. It demonstrates a meliorating, positive-sum style of politics. In an age when politics is laced with hate and contempt, that is worth quite a lot.

Jonathan Rauch is a senior fellow at the Brookings Institution and the author of “Political Realism: How Hacks, Machines, Big Money and Back-Room Deals Can Strengthen American Democracy.”

Peter Wehner is a senior fellow at the Ethics and Public Policy Center, served in the previous three Republican administrations and is a contributing Opinion writer for The New York Times.