The National Rifle Association urged a judge to overturn San Francisco's voter-approved handgun ban, arguing the city can't ban the guns because state law allows them.

Chuck Michel, an attorney for the NRA and gun enthusiasts suing to repeal the ban, said he was "sympathetic with the victims of gun violence," but he said lawful weapon owners "are part of the solution, and not part of the problem."

Without addressing the Second Amendment dispute over the constitutional right to bear arms, Michel argued that a local government cannot ban weapons because the California Legislature allows guns and has almost exclusive authority to regulate them.

Deputy City Attorney Wayne Snodgrass countered that the city can adopt such an ordinance because state law "is simply not protecting San Franciscans enough."

The ban was put to voters in November by the San Francisco County Board of Supervisors, which was frustrated by an alarmingly high number of gun-related deaths in the city of 750,000 residents. The NRA sued the day after 58 percent of voters approved it.

San Francisco County Superior Court Judge James Warren is expected to rule on the NRA challenge within the next three months.

The U.S. Court of Appeals for the District of Columbia Circuit is considering a challenge to a similar handgun ban in the District of Columbia that alleges the law violates a Second Amendment right of individuals to bear arms.

Snodgrass said at least two California court decisions support San Francisco's right to enforce the ban: A state appeals court in 1998 upheld West Hollywood's ban on sales of small, cheap handguns known as Saturday night specials, and the state Supreme Court three years ago found Los Angeles and Alameda counties could ban the possession and sale of weapons on government property, such as fairgrounds.

The high court did not address the issue of sales and possession on private property, though.

Michel noted that a state appeals court in 1982 nullified similar San Francisco gun ban largely on grounds that the city cannot enact an ordinance that conflicts with state law.

The bans on gun and ammunition sales begins March 1, and on handgun possession April 1. Snodgrass said the city would probably agree to delay it pending the judge's ruling. The city has not approved penalties for violators.