RALEIGH, N.C. (AP) — North Carolina’s Court of Appeals has rejected two former magistrates’ claim that their rights were violated by state guidance that they could lose their jobs if they refused to perform gay marriages.

Their lawsuit cited late 2014 guidance memos from the Administrative Office of the Courts.

The appeals court ruled Tuesday the plaintiffs lacked standing for their lawsuit because local judges have power to appoint, suspend or fire them — not state officials who sent the memo. The ruling upheld a lower court’s decision to dismiss their case.

The two devout Christian magistrates from Swain and Graham counties had resigned after the guidance was issued. They sued the state in April 2015.

State legislators later enacted a law allowing magistrates to avoid performing same-sex marriages based on religious beliefs.

© 2016, Associated Press, All Rights Reserved.

This material may not be published, broadcast, rewritten, or redistributed.