AB144 by state Assemblyman Anthony Portantino, D-Pasadena, makes it a misdemeanor to carry an exposed and unloaded gun in public or in vehicles, with violators facing up to a year in prison or a potential fine of $1,000 when the law takes effect Jan 1.
The bill exempts hunting and shooting events and does not apply to those who are given permits to carry a concealed weapon by local law enforcement authorities.
Portantino said the bill is an opportunity to prevent tragedy before it happens.
"It's not if somebody is going be shot, it's when somebody is going to be shot," he said. "We have the opportunity to avoid that, and that's why this is so critical."
He said law enforcement officials have been concerned about the proliferation of guns in public and the tense situations that arise when someone sees another person carrying a firearm in public. He said the encounters can escalate quickly because others don't know whether the gun is loaded or unloaded.
One of the first rules of firearms safety is to always assume a weapon is loaded.
"Main Street California is not the Old West, and you don't need a gun to buy a cheeseburger," Portantino said.
Top California law enforcement groups, including the California Police Chiefs Association and the Los Angeles Sheriff's Department, supported the legislation.
"By prohibiting the open carry of guns, we can now take our families to the park or out to eat without the worry of getting shot by some untrained, unscreened, self-appointed vigilante," Dallas Stout, president of the California chapters of the Brady Campaign to Prevent Gun Violence, said in a statement.
The Brady Campaign, which sponsored the legislation, said California joins Florida, Illinois, Oklahoma and Texas as the only states to ban the open carry of handguns. It said 33 states, including Pennsylvania, Michigan, Louisiana and Colorado, allow open carry.
Gun advocates and most Republican lawmakers have criticized the law, saying it targets law-abiding citizens. State Assemblyman Tim Donnelly, R-Hesperia, said Brown sent the message that he has no respect for the Constitution.
"There are risks to living in a free state, and for the governor to take away and chisel away at the Second Amendment right when he claimed to respect it, it just kind of shows his true colors," Donnelly said.