California residents don’t have to pay for and pass a background check every time they buy bullets, a federal judge has ruled.

The Tuesday ruling by U.S. District Judge Roger Benitez took effect immediately. California Attorney General Rob Bonta asked Benitez on Wednesday to delay the ruling to give him time to appeal the decision. It’s unclear if Benitez will grant that request.

Many states, including California, make people pass a background check before they can buy a gun. California goes a step further by making people pass a background check, which cost either $1 or $19 depending on eligibility, every time they buy bullets. A few other states also require background checks for buying ammunition, but most let people buy a license that is good for a few years.

Benitez said California’s law violates the Second Amendment to the U.S. Constitution because if people can’t buy bullets for their guns, they can’t use their guns for self-defense. He criticized the state’s automated background check system, which he said rejected about 11% of applicants, or 58,087 requests, in the first half of 2023.

“How many of the 58,087 needed ammunition to defend themselves against an impending criminal threat and how many were simply preparing for a sporting event, we will never know,” Benitez wrote. “What is known is that in almost all cases, the 322 individuals that are rejected each day are being denied permission to freely exercise their Second Amendment right — a right which our Founders instructed shall not be infringed.”

Bonta said Benitez’s ruling puts public safety at risk because it would immediately let people who are not legally allowed to have ammunition to buy it — including convicted felons, people with mental illnesses and those with some domestic violence convictions.

“We will not stop in our efforts to protect the safety of communities and Californians’ rights to go about their business without fear of becoming victims of gun violence, while at the same time respecting the Second Amendment rights of law-abiding gun owners,” Bonta said.

Chuck Michel, president and general counsel of the California Rifle & Pistol Association, said California’s requirement for a background check on all ammunition purchases “has not made anyone safer.”

“But it has made it much more difficult and expensive for law-abiding gun owners to exercise their Second Amendment right to defend themselves and their family,” he said.

California has some of the nation’s toughest gun laws. Many of them are being challenged in court in light of a recent U.S. Supreme Court decision that set a new standard for interpreting gun laws, stating they must be consistent with the nation’s historical tradition of firearm regulation.

Benitez has already struck down two other California gun laws — one that banned detachable magazines that have more than 10 bullets and another that banned the sale of assault-style weapons. Those decisions have been appealed. Other gun laws being challenged include rules requiring gun stores to have digital surveillance systems and restricting the sale of new handguns.