The state of North Carolina has restored lost salary and retirement benefits to a former magistrate whom officials forced out because she wouldn’t abandon her religious beliefs to perform civil marriage ceremonies for same-sex couples.

Gayle Myrick won $300,000, including $122,660 in back pay, in a settlement agreement made public Wednesday by her lawyers at Becket, a Washington-based nonprofit that defends religious freedom.

“This case is about protecting the dignity of everyone in our diverse society,” Becket counsel Stephanie Barclay told The Daily Signal in an email. “Faith and sexual orientation are deeply important to the identity of many people, and these two things don’t have to be at odds with each other.”

An administrative law judge ruled nearly a year ago that the state violated civil rights laws when it forced Myrick to resign as a Union County magistrate because of her religious beliefs about marriage.

North Carolina was “obligated to provide an accommodation” to Myrick as provided by federal law, Judge Michael Devine’s March 8 ruling said.

Myrick, now 68 and a resident of the Charlotte area, originally filed a discrimination complaint with the U.S. Equal Employment Opportunity Commission under the federal Government Employee Rights Act. The final settlement in Myrick v. EEOC ends the case.

Becket produced this video about Myrick’s case:

“The state of North Carolina should not have discriminated against Gayle Myrick for her sincerely held religious beliefs about marriage. Accommodating her conscience took nothing away from same-sex couples’ ability to obtain marriage licenses,” Ryan T. Anderson, a senior research fellow at The Heritage Foundation, and Emilie Kao, a lawyer who directs Heritage’s DeVos Center for Religion and Civil Society, said in a joint statement to The Daily Signal.

“Our country has found ways to honor the consciences of those with differing views on the death penalty, the draft, and abortion. And federal employment anti-discrimination law requires we do the same on marriage too. Anything less would be un-American,” Anderson and Kao said.

Here’s what happened to Myrick, according to Becket:

As a magistrate, Myrick issued warrants, set bail, processed fines for traffic violations, and occasionally performed civil marriage ceremonies.

Even before the Supreme Court redefined marriage to include same-sex unions in 2015, Myrick, an evangelical Christian, decided that she didn’t want to stop any couple from getting married but knew it would violate her religious beliefs to officiate at a same-sex wedding.

Her immediate supervisor proposed that Myrick could shift her schedule by a couple of hours so she wouldn’t be at work when other magistrates did marriage ceremonies.

The state government rejected this accommodation, however, and forced Myrick to resign in October 2014, two weeks before her retirement benefits vested.

“I have always wanted to find a way to protect everyone’s dignity,” Myrick said at the time, according to a written statement provided by Becket. “The solution in my case would allow any couple to get lawfully married without facing rejection or delay, and magistrates with religious beliefs like me could step aside and still keep our jobs.”

Later in 2015, state lawmakers passed a bill allowing magistrates to decline to perform same-sex marriages if they cite religious beliefs. In doing so, they must refrain from all marriage ceremonies, the Associated Press reported.

Other magistrates in Union County routinely shifted schedules for various reasons, including vacations or night classes, Myrick’s lawyers argued, and she could have kept her job if she made the change for a reason not motivated by faith.

“If one government employee can change their work schedule to go fishing, another should absolutely be able to change their schedule for their faith,” Barclay told The Daily Signal.

State officials later acknowledged treating Myrick unfairly, she said, and the Nov. 27 settlement agreement “makes her whole” by paying the lost salary and retirement benefits.

W. Ellis Boyle, a lawyer in Raleigh, also represented Myrick.

A spokeswoman for the North Carolina Justice Department, the agency that represented the state in the case, declined comment Wednesday, AP reported.