Historically, Democrats and Republicans have agreed that religious liberty is a core American value that should be protected whenever possible. Yet over the past decade, this consensus has come under increasing assault from the left.

A recent manifestation of this hostility to people of faith is a Dec. 9 lawsuit challenging a North Carolina statute (known as Senate Bill 2) that accommodates state magistrates and clerks whose sincere religious objections prevent them from solemnizing or licensing certain marriages allowed by law. According to Equality North Carolina, an LGBT advocacy group that plans to draw attention to the lawsuit along with the Campaign for Southern Equality, the law “allows magistrates who do not believe in marriage equality to renounce their judicial oath to uphold and evenly apply the United States Constitution.”

This is nonsense. The Supreme Court’s recent decision redefining marriage for the entire nation requires North Carolina to legally recognize same-sex marriages, but there is no constitutional right for couples to be married by any particular state official.

Indeed, North Carolina could conceivably dispense with the solemnization requirement for marriages entirely and use an online system similar to that used by Hawaii for licensing. But, like most states, it has elected to allow magistrates to solemnize marriages and clerks (called registers of deeds) to license them. All Senate Bill 2 did was permit those with sincere religious objections to any part of the process to recuse themselves entirely. Adding this opt-out system into the North Carolina law provides a reasonable accommodation for those with religious objections and hurts no one, because the law guarantees that there will be magistrates available to perform marriages.

Only about 5 percent of North Carolina’s roughly 670 magistrates have taken advantage of this accommodation. In these few cases, other state officials have been made available to perform marriages in affected jurisdictions, just as the law requires. To date, exactly zero couples have been unable to marry because of this protection.

North Carolina’s law is a perfect example of a win-win situation. Everyone gets a marriage license, and no one is forced to choose between losing his job and violating his conscience.

To be clear, it isn’t just North Carolina law that requires an accommodation. Title VII of the Civil Rights Act of 1964 requires all employers, including the government, to make reasonable accommodations for those who do not want to shed their religious beliefs when they step into the workplace. North Carolina’s law is eminently reasonable. Civil servants, whose jobs have been redefined with the redefinition of marriage, deserve the opportunity to remain in their jobs without violating their consciences.

As Mark David Hall, one of the authors of this article, argued in a recent backgrounder, America’s history of accommodating religious citizens stretches from the founding until the present day.  These religious protections have not kept the nation or states from meeting important policy objectives and courts, including the United States Supreme Court, have regularly ruled them to be compatible with the First and Fourteenth Amendments.

Only about 5 percent of North Carolina’s roughly 670 magistrates have taken advantage of this accommodation. To date, exactly zero couples have been unable to marry because of this protection.

In an ironic twist missed by Equality North Carolina, some of the oath provisions they claim require magistrates to violate their religious convictions themselves contain religious accommodations.  Both the U.S. and North Carolina constitutions permit individuals to “affirm” rather than “swear” their oaths. Although any citizen can take advantage of these provisions, historically they were adopted to protect Quakers and other religious minorities who had religious objections to taking oaths.

Americans have long recognized that it is unconscionable to force individuals to choose between public service and their religious convictions if the latter can be reasonably accommodated. An excellent example of this is a federal law that protects federal and state prison officials from being forced to attend or participate in an execution contrary to their moral or religious convictions.

Indeed, few know that before the Kim Davis controversy over marriage licenses, Kentucky clerks were allowed by law to opt out of issuing hunting licenses if they were, for example, strict vegetarians. These laws, along with numerous others granting religious accommodations, show that America can and should find reasonable ways to protect its citizens from being forced by the government to violate their conscience.

The lawsuit attacking the North Carolina statute has no legal or historical standing. The statute continues America’s proud history of recognizing and protecting the rights of conscientious objectors without denying anyone’s rights. Other states would do well to follow North Carolina’s model.