The measure,Assembly Bill 1934, received the bare-minimum number of votes necessary, passing 41-25, with Republicans opposed.
The bill was crafted in response to a protest movement, "Open Carry," in which activists wield unloaded guns in public places to publicize opposition to gun-control laws as well as difficulties in obtaining concealed-weapons permits.
Opponents countered that AB 1934 would infringe on Californians' right to bear arms and to protest peacefully in whatever manner they choose.
State law bans the carrying of loaded firearms in public, but not unloaded weapons.
AB 1934 would make it a misdemeanor, punishable by up to six months in jail, to carry an exposed, unloaded gun in a public place or on a public street inside a city or in prohibited unincorporated areas of a county.
The bill contains numerous exceptions, including display of a firearm by a peace officer, authorized military organization, firearm dealer, or by a licensed hunter while engaged in that sport.
AB 1934 now goes to the Senate.