RALEIGH, N.C. (AP) - North Carolina is paying a $300,000 legal settlement to a former magistrate who resigned under duress because her religious beliefs prevented her from marrying gay couples.

The settlement finalized in January and made public Wednesday includes about $210,000 in lost pay and retirement benefits, in addition to attorneys' fees.

Gayle Myrick was a Union County magistrate who resigned in 2014 after federal courts made gay marriage legal in North Carolina, and state court officials urged magistrates to follow the ruling. An administrative judge for the Equal Employment Opportunity Commission ruled last year that her employer failed to accommodate her religious beliefs.

North Carolina enacted a law in 2015 allowing magistrates to opt out of marrying gay couples. A challenge to that law was rejected by a federal appeals court.