FILE - In this Jan. 5, 2016 file photo, empty bullet casings sit in a container at the National Armory gun store and gun range in Pompano Beach, Fla. The California Supreme Court will decide whether state laws can be challenged in court on the grounds that complying with them is impossible in a lawsuit over a California law that requires new models of semi-automatic handguns to stamp identifying information on bullet casings. (AP Photo/Lynne Sladky)

FILE - In this Jan. 5, 2016 file photo, empty bullet casings sit in a container at the National Armory gun store and gun range in Pompano Beach, Fla. The California Supreme Court will decide whether state laws can be challenged in court on the grounds that complying with them is impossible in a lawsuit over a California law that requires new models of semi-automatic handguns to stamp identifying information on bullet casings. (AP Photo/Lynne Sladky)

SAN FRANCISCO (AP) — The California Supreme Court threw out a lawsuit Thursday that sought to block an unusual law requiring new models of semi-automatic handguns to stamp identifying information on bullet casings when shots are fired to make it easier to solve crimes.

The court ruled unanimously that gun rights groups could not overturn the requirement by arguing it was impossible to comply with the law that supporters touted as a first in the nation. The groups argued that the technology did not exist, and a law could not mandate something that was not possible.

ADVERTISEMENT

Attorneys for the state acknowledged that microstamping technology is “emerging” but said lawmakers often enact laws to force industries to innovate.

Writing for six of the justices, Associate Justice Goodwin Liu said impossibility can sometimes lead courts to excuse a failure to comply with a law, but it can’t be the basis for invalidating it.

Larry Keane, general counsel for one of the plaintiffs, the National Shooting Sports Foundation, said he may ask the court to reconsider its ruling because it appeared to misunderstand the aim of the lawsuit.

It was not seeking to invalidate the state law but to block its enforcement until technology made it possible to comply with the stamping requirement, Keane said.

“It is undisputed and not contested by the state that it is literally impossible to comply,” he said.

The California attorney general’s office said it did not concede that compliance with the law is impossible.

“Today’s ruling confirms that California can create incentives for the gun industry to make products that serve the public’s needs,” Attorney General Xavier Becerra said in a statement. “Innovation and technology will continue to drive California to be a leader.”

Washington, D.C., has a similar law, according to the Giffords Law Center to Prevent Gun Violence, which filed a court brief in support of California’s law.

The California law requires new-model pistols to have a microscopic array of characters in two spots that identify the gun’s make, model and serial number and are imprinted on the casings when the weapon is fired.

Gun rights groups say it is not possible to “microstamp” two areas of a firearm. Only the tip of the firing pin can be microstamped, and current technology doesn’t allow the stamp to reliably, consistently and legibly imprint on the cartridge primer from that part of the gun, they say.

ADVERTISEMENT

The law, which Gov. Arnold Schwarzenegger signed in 2007 and took effect in 2013, doesn’t affect guns already on the state’s official firearm roster. Only new or modified semi-automatic handguns sold in California must be equipped with the technology.

Keane said the law has significantly reduced the number of handguns available for sale in the state.

A separate lawsuit challenging the law on constitutional grounds is pending before a federal appeals court in San Francisco.