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.

According to the AP, a judge in Asheville ruled that a lawsuit brought by three North Carolina couples, two same-sex couples and one interracial couple, lacked evidence showing they were harmed directly by the law.

The law in question allows magistrates, assistant registers of deeds, and deputy registers of deeds to recuse themselves from performing duties related to marriage ceremonies due to “sincerely held religious objection.”  It is commonly referred to as Senate Bill 2.

Senate Bill 2 became law after the North Carolina General Assembly overrode a veto by Governor Pat McCrory in 2015.  North Carolina and Utah are the only two states with such a law.