No township may pass an ordinance that restricts or prohibits, or imposes any tax, licensure requirement, or licensure fee on the possession, storage, transportation, purchase, sale, transfer, ownership, manufacture, or repair of firearms or ammunition or their components. Any ordinance prohibited by this section is null and void. The attorney general shall send a cease and desist order to any township that passes or enforces an ordinance in violation of this section. If the township fails to comply with the order, the attorney general shall bring an action in the name of the state for injunctive relief against any township that has passed an ordinance in violation of this section. A court shall grant any person charged with a violation of an ordinance prohibited under this section reasonable costs, expenses, and attorney's fees. This section does not apply to any generally applicable zoning ordinance, building regulation, or fire code so long as the ordinance, regulation, or code is not used to circumvent the prohibition under this section.
SDCL 8-5-13