Sam Brownback is challenging federal gun laws. (John Hanna/AP)

A fight is brewing in Kansas over the constitutionality of laws that aim to bar enforcement of federal gun-control measures.

In late April, the Kansas legislature passed and Gov. Sam Brownback (R) signed a law that blocks enforcement of any federal gun laws on guns produced and used within the state of Kansas. Under the law, “any act, law, treaty, order, rule or regulation of the government of the United States which violates the second amendment to the constitution of the United States is null, void and unenforceable in the state of Kansas.”

Attorney General Eric Holder has written to Brownback that the law is unconstitutional and that the government  “will take all appropriate action including litigation if necessary, to prevent the State of Kansas from interfering with the activities of federal officials enforcing federal law.”

Brownback replied that he stands by the law and that it has broad support in the state, from Democrats and Republicans. "The people of Kansas have clearly expressed their sovereign will," he wrote Thursday. "It is my hope that upon further review, you will see their right to do so." The state argues that because the law only applies to guns in the state of Kansas, it is not covered by the commerce clause of the Constitution giving Congress regulatory power.

“With respect to any litigation, we will happily meet Mr. Holder in court,” Kansas Secretary of State Kris Kobach (R) told the Lawrence Journal-World.

Legal experts generally agree that Holder is in the right here.

"The state is not free to nullify valid federal laws," said Adam Winkler, a constitutional law professor at UCLA and author of a book on gun rights. "Federal laws regulating the sale of firearms, even within one state, are clearly constitutional under the commerce clause." The part of the law that bars state officials from enforcing federal gun laws is "on sounder ground," he said, as long as those officials don't interfere with federal law enforcement.

The conservative Heritage Foundation put out a fact sheet last year, "Nullification: Unlawful and Unconstitutional," that says, "there is no clause or implied power in either the national or the various state constitutions that enables states to veto federal laws unilaterally." The chairman of the libertarian Cato Institute has written that state officials can refuse to enforce federal laws deemed unconstitutional, but states can't block federal authorities from enforcing federal law.

Missouri's legislature is moving forward with a similar law. The Alaska legislature passed a modified version that only bars state agencies from helping enforce federal gun laws. A Wyoming bill would only nullify new gun restrictions. Legislation nullifying federal gun bans was vetoed in Montana by Gov. Steve Bullock (D). But a 2009 law in the state, signed by then-Gov. Brian Schweitzer, is the model for most of the new attempts. It's currently in appeals court.

It's unlikely that any of these laws will actually be enforced; they're generally seen as political statements designed to protest new gun-control laws — none of which have shown a sign of passing in the Senate.