The Montana Attorney General's Office is asking a Montana District Court judge to dismiss a lawsuit filed against him by the city of Missoula over background checks for gun sales, saying it lacks merit on nearly every count.

Tim Fox filed his response to the city's lawsuit on June 7, roughly two months after the city challenged the attorney general's opinion declaring Missoula's 2016 ordinance requiring background checks on most gun sales and transfers unenforceable.

“We'll be filing a more detailed response later this year following a period of discovery,” Anastasia Burton, communications director for the Attorney General's Office, said Tuesday.

The city’s legal challenge, also filed in Missoula District Court, rekindled a debate over a local government’s right in Montana to close the background check loophole – something 19 other states and the District of Columbia have already done.

Missoula became the first municipality in Montana to enact such an ordinance in September 2016, though Fox declared the ordinance unenforceable in January 2017.

Fox was asked to consider the issue in a legal opinion requested by state Rep. Austin Knudsen, R-Culbertson.

“A city, town, or other local government entity with self-governing powers is prohibited by Montana state law from enforcing a local regulation or ordinance requiring background checks on firearm sales or transfers within its borders,” Fox wrote in his ruling.

Fox’s opinion stood in conflict with an opinion issued the year before by Missoula City Attorney Jim Nugent, who determined that Montana law does, in fact, grant local governments the power to adopt background checks.

The issue will be decided by District Judge Robert “Dusty” Deschamps. The city is represented by Boone Karlberg P.C. and Everytown for Gun Safety, which has taken the case on a pro-bono basis.

The city has capped its fees for Boone Karlberg at $25,000.