PHOENIX (AP) — The city of Tucson has agreed to pay the Arizona attorney general's office $100,000 to cover the state's costs of prosecuting a case where it alleged the city was likely violating state law by destroying seized firearms.

The agreement released Wednesday comes about a month after the Arizona Supreme Court sided with the state. The court ruled that a Tucson gun destruction ordinance conflicts with a state law requiring municipalities to sell guns that come into their possession.

The court said the city would be responsible for the attorney general's reasonable attorney fees. The city and state agreed to settle for a $100,000 payment.

The case was the first test of a 2016 law passed by the Republican-controlled Legislature targeting cities that adopt laws conflicting with those it passes.