The Montana State Supreme Court rejected a “universal background check law” put on the books in Missoula, saying the local ordinance conflicts with the state’s firearms preemption law that leaves gun legislation in the hands of state lawmakers, not local officials.

The high court ruled 5-0 in favor of Montana Attorney General Tim Fox, who voided in 2017 the Missoula City Council’s ordinance adopted the year earlier, arguing the council did not have the authority to infringe on gun ownership rights in the state and U.S. constitutions. Missoula City Council President Bryan Von Lossberg told the Missoulian on Tuesday he was “deeply saddened” by the ruling.

He can be sad, but he shouldn’t be surprised. The state Supreme Court made it clear that the the ordinance went to0 far, as did Montana’s Attorney General.

In a statement provided by his office, Attorney General Fox said he had informed Missoula it lacked authority to impose the regulations in the ordinance. “When Missoula tried to do so anyway, I asked that an Attorney General Opinion request be submitted to my office, confident that our legal position would be vindicated in the end,” Fox said. “Today the Supreme Court upheld my office’s conclusion in a 5-0 ruling. Missoula’s ordinance is unenforceable. The rule of law and Montana’s constitution matter.”

Indeed they do, but not to gun control activists. In fact, gun control groups have been challenging state-level firearms preemption laws across the country by passing local ordinances that conflict with state law, in hopes that courts will strike down or weaken the preemption laws on the books. In this case, the Montana Supreme Court delivered a smackdown to those eager to infringe on the rights of residents.

In its Tuesday ruling, the Supreme Court said the ordinance went too far beyond keeping guns away from convicted felons, minors and the mentally ill. While the state law controlling local government’s ability to enact gun regulations allows cities the ability to restrict “possession” of firearms, it does not allow restrictions on purchase, sale, other transfer, ownership, transportation and use, the justices wrote. “Nothing within the language of (state code annotated) permits cities to regulate these other functions in any manner, yet the ordinance does so,” Justice Jim Rice wrote. “Although purporting to merely suppress the ‘possession’ of firearms by convicted felons, adjudicated mental incompetents, illegal aliens, and minors, the scheme of the ordinance goes much further.”

Last year, the Missoula City Council president told local paperthat the ordinance was simply a “commonsense” step to ensure prohibited individuals didn’t get ahold of a gun, not an attack on the Second Amendment.

While some opponents of the ordinance see it as an effort by the city to curb Second Amendment rights, von Lossberg argues otherwise – a stance he’s maintained from the day he first brought the measure forward. He points to the compromises made along the way, including changes that exempted from the ordinance those with a concealed carry license. Other family exemptions were also included, despite the opposition of background check advocates. “Those are examples of community dialogue, and the folks who were proponents of the ordinance weren’t happy about that, but that’s compromise,” von Lossberg said.

As it turns out, violating the law just a little is still violating the law, as the Montana Supreme Court made clear. Congratulations to the gun owners and Second Amendment group that challenged the law, as well as Attorney General Tim Fox for his efforts to ensure that the state’s firearms preemption law isn’t merely a symbolic piece of legislation.