Plaintiffs Diane Ansley, left and her wife, Cathy McGaughey, outside the federal courthouse in Asheville, N.C. on Aug. 8, 2016.

A federal judge on Tuesday dismissed a lawsuit challenging North Carolina's law that lets court magistrates recuse themselves from performing marriages — a policy passed one month before the Supreme Court's widely anticipated decision in 2015 legalizing same-sex marriages nationwide.

The plaintiffs in the lawsuit, including two same-sex couples, said Tuesday they would appeal the decision. They had argued at least 32 magistrates have declined to perform marriages due to their religious objections since the law was passed, a violation, the plaintiffs argue, of constitutional rights.

In tossing out their claim, US District Judge Max Cogburn wrote that the couples lacked standing to bring the lawsuit and the court therefore lacked jurisdiction. None of the couples have been denied a marriage license or been refused a wedding by a court magistrate under the law.

"As Plaintiffs have made no allegations of an 'injury in fact' that might otherwise allow them to assert standing in this case, Plaintiffs have failed to meet their burden of showing they have standing to bring Due Process and Equal Protection claims," Judge Cogburn wrote.

Mat Staver, chairman of Liberty Counsel, which is representing a magistrate, lauded the decision on Wednesday, saying that "magistrates should not be forced to violate their conscience, especially where there are reasonable options to accommodate their religious convictions."

Represented in part by the LGBT advocacy group Campaign for Southern Equality, the couples filed a notice they intend take their case to the 4th Circuit Court of Appeals.

North Carolina is enmeshed in a tangle of other legal battles over a separate state law that overrides local LGBT nondiscrimination ordinances and bans many transgender people from restrooms that match their gender in government buildings.

Passed in May 2015 as Senate Bill 2, however, the law concerning magistrates allows the court officials to claim “any sincerely held religious objection” in order to opt-out of performing marriages. If they do so, they cannot perform any marriage for six months, same-sex or opposite-sex couples, and the state must find another official to perform the marriages in their absence.

The complaint filed in December of 2015 argued the law violates the First and Fourteenth amendments by promoting a religious viewpoint at taxpayer expense and letting public officials violate their oath to uphold the Constitution.

McDowell County Register of Deeds Tonia Hampton told BuzzFeed News last year that marriage licenses were still being issued and magistrates from other counties had been shipped in to perform marriages in cases where officials recused themselves. The state is required to pay to shuffle court officials from county to county as needed.