(10-10) 11:24 PDT Sacramento --

Gov. Jerry Brown has outlawed the open carrying of unloaded handguns in California, signing a bill late Sunday night that makes the practice that had been popular with some gun rights advocates a misdemeanor in the state.

The bill, AB144 by Assemblyman Anthony Portantino, D-La Cañada Flintridge (Los Angeles County), will take effect Jan. 1 and was backed by law enforcement officials throughout the state who said the practice created a public safety issue.

"We view the open carrying of unloaded handguns as a threat to the safety of the communities we police and the safety of our officers," said David L. Maggard, Jr., president of the California Police Chiefs Association.

The ban does not apply to law enforcement, people authorized to carry loaded weapons in public or to people selling unloaded weapons at gun shows, among other exemptions.

Violations of the law will carry a fine of up to $1,000 and up to six months in county jail.

In addition, Brown signed into law a bill that will require that the information from purchasers of long guns, such as rifles and shotguns, be retained by the state Department of Justice in the same way information about handgun purchasers is retained.

Currently, the information of people who buy long guns is destroyed.

More for you News Jerry Brown signs antibullying, open-carry bills

In a message accompanying the signed bill, AB809 by Assemblyman Mike Feuer, D-Los Angeles, Brown wrote, "Since the state already retains handgun purchaser information, I see no reason why the state should not also retain information pertaining to the sale of long guns."