A 9th U.S. Circuit Court of Appeals panel Tuesday reluctantly upheld an Alameda County ordinance banning weapons on government property, ruling that gun enthusiasts have neither a First Amendment nor Second Amendment right to possess weapons at county facilities.

If the decision survives appeal, the ruling is expected to lead to an avalanche of similar ordinances across California, the only state where municipalities have barred gun shows on government property. Los Angeles County and others already have similar ordinances.

In December, San Mateo County approved an ordinance that bans guns on county property, similar to Alameda County's law. Supervisor Mike Nevin was pleased with Tuesday's ruling. ''We're excited because our ordinance will be upheld,'' he said. He said having guns sold on county property sends the wrong message.

Santa Clara County tried to regulate gun shows by writing restrictions into the county fairgrounds lease, but in 1997 a federal court ruled that the restrictions violated free speech. It was unclear Tuesday how the three-judge panel's ruling will affect Santa Clara County.

''We're going to have to review the actual decision to determine whether it will open doors for further consideration,'' said Gwendolyn Mitchell, county public communications director.

Alameda County's ordinance outlawed weapons on county property including county courthouses, government offices and health centers, and forbade gun shows at the Alameda County Fairgrounds if weapons were on the premises.