Smith & Wesson said it will stop selling new versions of semiautomatic pistols in California because of a law requiring the weapons to stamp identifying information onto bullet casings when the guns are fired.

The law, signed by then-Gov. Arnold Schwarzenegger in 2007, requires that new or updated semiautomatic handgun models be equipped to imprint the make, model and serial number of the gun on each cartridge case, using a technique known as microstamping.

California’s firearms laws are among the most restrictive in the U.S. The state passed the nation’s first assault-weapon ban in 1989. Microstamping, intended to aid police in solving crimes, is opposed by gun-rights advocates who say the additional cost penalizes lawful gun owners.

In a statement, Smith & Wesson, based in Springfield, Mass., said the technology is “unreliable, serves no safety purpose, is cost prohibitive and, most importantly, is not proven to aid in preventing or solving crimes.”

The provision was supposed to take effect in 2010. It was delayed until the state attorney general’s office in May determined that microstamping technology was available to manufacturers unrestricted by patents, a condition of the bill when it was enacted. A gun-rights group, the Calguns Foundation, paid to extend the existing patent in an attempt to forestall the law.

The National Shooting Sports Foundation and the Sporting Arms and Ammunition Manufacturers’ Institute earlier this month filed suit to invalidate the law.