/ Updated 
By Brooke Sopelsa and Associated Press

RALEIGH, N.C. — A federal judge has dismissed a challenge to a North Carolina law that allows magistrates to refuse to marry same-sex couples by citing religious beliefs.

The judge in Asheville dismissed a lawsuit filed by three couples, two gay and one interracial. The judge ruled that the couples lacked legal standing as taxpayers to sue and lacked evidence showing they were harmed directly by the law taking effect in June 2015. Still, U.S. District Judge Max Cogburn wrote there is potential someone could suffer real harm because of the law.

"While we are disappointed that the judge ruled on a technicality, we are heartened that he acknowledged the real problems and pain in allowing laws like this to stand," Brian Silva, Executive Director of Marriage Equality USA, told NBC OUT.

The plaintiffs' lawyers filed a notice Wednesday that they'll appeal Tuesday's ruling to the 4th U.S. Circuit Court of Appeals.

"We are confident the law will eventually be overturned because our country already protects religious freedom without allowing it to be used to discriminate," Silva said.

North Carolina is one of only two states (Utah being the other) with such religious-objection laws that are being enforced. About 5 percent of North Carolina's magistrates have filed recusal notices.

Follow NBC OUT on Twitter, Facebook and Instagram.