Gov. Jay Nixon vetoed legislation Friday that would have made it a Missouri crime for federal agents to attempt to enforce federal gun laws in the state and could have landed journalists in jail for publishing the names of gun owners.

The Democratic governor said the bill passed by the Republican-led Legislature violated the supremacy clause of the U.S. Constitution, which generally gives preference to federal laws over conflicting state ones. He said it also infringed in the First Amendment rights of free speech and press.

Some supporters of the legislation had proclaimed it one of the most gun-friendly bills ever passed by a state legislature. Nixon, however, said it could have had extreme consequences.