WICHITA, Kan. (AP) — An appeals court on Tuesday upheld the firearms convictions against two Kansas men who mistakenly believed that a Kansas law can shield from federal prosecution anyone owning firearms made, sold and kept in the state.

The 10th U.S. Circuit Court of Appeals rejected Shane Cox and Jeremy Kettler's challenges to their federal convictions under the National Firearms Act.

The three-judge panel did not address the constitutionality of the state's Second Amendment Protection Act, which Kansas defended when intervening in the criminal case. The state gun law says firearms, accessories and ammunition manufactured and kept within Kansas borders are exempt from federal gun control.

Cox was convicted of making and marketing unregistered firearms, and Kettler was convicted for possessing an unregistered gun silencer.

The men challenged the constitutionality of the National Firearms Act, alleging it is an invalid exercise of congressional power and an invasion of the Second Amendment right to bear arms. They also challenged the lower court's ruling their reliance on the state law provided no defense to the federal charges.

Separately, Kettler argued further that his prosecution resulted from the dispute between Kansas and the federal government over the Kansas law.

The appeals court panel rejected all the defense arguments in a 47-page decision. It concluded the federal gun law falls within Congress' power to tax. The court also noted that the men's reliance on the state mitigated their sentences, if not their guilt. It noted the district court took their mistaken reliance on the state law into consideration when it sentenced them to probation.

The appellate panel also rejected Kettler's request for relief for what he described as being "ensnared in a constitutional dispute" between Kansas and the federal government.

When Cox began selling his homemade firearms and silencers out of his military surplus store, he stamped "Made in Kansas" on them to assure buyers that a Kansas law would prevent federal prosecution of anyone owning firearms made, sold and kept in the state.

Cox, a Chanute resident, also gave customers copies of the Second Amendment Protection Act, which was passed by the Kansas Legislature in 2013 and signed by then-Gov. Sam Brownback. Cox even collected sales taxes. His biggest-selling items were unregistered gun silencers, prosecutors have said. Kettler, who was one of Cox's customers, was so enthusiastic about the silencer that he posted a video on Facebook.