Gayle Myrick resigned from her position as a North Carolina magistrate in 2014 because she didn’t want to perform same-sex ceremonies. (The Becket Fund)

Since the Supreme Court legalized same-sex marriage nationwide in 2015, a slew of controversial cases have raised questions over whether LGBT rights can coexist with religious rights. One of the most hotly debated cases involved Kim Davis, a Kentucky county clerk who famously refused to let her staff issue marriage licenses to same-sex couples in 2015 and went to jail for six days during a legal battle that went to the Supreme Court.

As the battles continue in the courts and in legislatures, some religious-freedom advocates who would like to see a compromise have expressed fears that the country is at an impasse and that the law will ultimately favor one set of rights or the other.

The Supreme Court could clarify controversial questions when it decides later this year whether a bakery owner has the constitutional right to decline to make a cake for a same-sex wedding.

Meanwhile, some advocates are pointing to a case in North Carolina that they say could provide a national blueprint for compromise on the issue.

In 2014, after same-sex marriage was legalized in North Carolina, Gayle Myrick resigned from her job as a magistrate in the state because she believed that performing civil marriages for same-sex couples went against her faith.

Unlike Davis, Myrick did not object to marrying any specific couple, and she did not ask other employees in the office to refuse to do so. (Davis has recently said she no longer objects to issuing licenses for same-sex couples since Kentucky changed the rules so clerks do not have to attach their names to licenses.)

When Myrick, who attends a Southern Baptist church, raised her discomfort with performing a same-sex ceremony, her supervisor suggested she could remove her from the duties of performing marriages altogether. However, a higher-level supervisor said her schedule could not be adjusted to excuse her from marriage duties.

“I didn’t want to stop anyone from getting married,” said Myrick, who is 68 and lives in Monroe, N.C. “I also knew my religious convictions would not allow me to perform those marriages personally.”

A federal judge ruled last year that she should have been allowed to opt out of performing marriages because of her religious beliefs. As a result, Myrick reached a settlement in January with the government to compensate her for her pay, retirement pay and attorneys’ fees. She has been represented by the Becket Fund, which has taken up high-profile cases such as Hobby Lobby’s Supreme Court case on insurance coverage for contraception. The opinion in her case doesn’t serve as binding precedent on other district judges, but a lower court decision like this could be cited in future cases.

In 2015, North Carolina passed a law that allows magistrates (who work as lay judges) to opt out of performing all marriages based on a “sincerely held religious objection.” The law requires counties to make other magistrates available to handle marriage licenses and same-sex weddings if they have recusals.

Some religious-freedom observers and activists see the state law and Myrick’s case as a victory in the tension between LGBT rights and government workers’ religious rights. A same-sex couple seeking to wed wouldn’t know that a government official intends to discriminate against them, as the official would be opting out of all marriages, activists argue.

“Nobody’s entitled to the right to insult someone or deny someone to their face,” said Ira Lupu, a law professor emeritus at George Washington University who specializes in the First Amendment. “People have a right to be accommodated in the workplace so long as there’s [no] harm to the people being served.”

Title VII of the Civil Rights Act of 1964 states that employers must reasonably accommodate the religious practices of employees if that can be done without undue hardship. The problem with Davis’s case was that she didn’t seek just to exempt herself, said Douglas Laycock, a professor at the University of Virginia Law School. Instead, she sought to exempt the whole county. Laycock said he believes that exemptions in government offices should be narrower than those in businesses because the government must treat all citizens equally — but that Myrick’s case seemed like a win-win compared with Davis’s case.

“[Davis] wouldn’t let anyone issue licenses,” Laycock said. “But the county is not an employee, the county has no religion, and exempting the county would deprive all same-sex couples of essential government services. Substituting a different [official] for Myrick doesn’t deprive anyone of anything.”

But others are fearful that such laws could give government workers license to discriminate.

“The law already draws the line for ministers and religious institutions. But this is a government officials, said Louise Melling, deputy legal director of the American Civil Liberties Union. “The question is where the law draws the line.”

Claims for exemptions based on religious beliefs aren’t new, Melling said, and they were raised after civil rights laws were enacted to prevent racial discrimination. Bob Jones University, which previously banned interracial dating, lost a Supreme Court case when the court ruled that the First Amendment did not prevent the IRS from revoking the tax-exempt status of a religious university whose practices are contrary to compelling government interest.

“If you say a magistrate wants exemption … the government is then licensing discrimination,” Melling said.

Several states have wrestled with similar cases. The “Utah compromise” in 2015 was hailed by some as an accommodation between Mormon leaders and LGBT activists, a signal that leaders on both sides could be open to giving a bit. The law banned employers and landlords from discriminating against people on the basis of sexual orientation and gender identity, and it also protected employees from being fired for talking about religious or moral beliefs.

The North Carolina law has some similarities to the Utah law, but Utah’s law didn’t specifically allow government officials to opt out of performing marriages. Utah made it so that the state would perform marriages using “willing clerks” or others in the community authorized to marry people. And if a same-sex couple comes into the office for a license and no willing clerks are available, then the elected town clerk does the service.

No state anti-discrimination laws have been passed since the Utah legislation, according to Robin Fretwell Wilson, a professor at the University of Illinois College of Law who worked on the Utah legislation.

Could laws similar to those in these two states be enacted across the country? Some observers, including Laycock, believe that compromises may be difficult to find in the future and that the country could be at a stalemate.

“The challenge here is to protect the rights of both sides as much as possible, and more often than not, that is entirely possible if we had just a smidgen of goodwill on both sides,” Laycock said.

The Supreme Court’s decision on the bakery case, which is expected late spring, could cause a kind of stalemate between the sides, said Charles Haynes of the Newseum’s Religious Freedom Center.

“In this fight, we have reached a point where both sides see this as a zero-sum game,” he said.

Editor’s note: This story has been updated to include the potential impact on the case on other cases. It has also been updated to clarify the intended meaning from an interview with Ira Lupu of Georgetown Washington University.