A federal judge in California has struck down a law that requires a 10-day waiting period for gun purchases, but only for current gun owners who have already passed a background check and those who have a permit or certificate of eligibility to own a gun.

Eastern District of California Judge Anthony W. Ishii said Monday that the waiting period provision violates the Second Amendment rights of those who have already been approved to own a gun. This includes those who have previously undergone a background check and own a gun, people with concealed-carry permits and people who have a state certificate of eligibility to own a gun.

First-time gun buyers would still be subject to the waiting period, which Ishii emphasized in his ruling.

“Given the nature of the challenges made, the Court emphasizes that it is expressing no opinion on the constitutionality of the 10-day waiting period in general or as applied to first time California firearms purchasers,” he said.

The Sacramento Bee reports Ishii stayed his ruling for 180 days in order to give California time to change the law.

According to the Sacramento Bee, the law was challenged by two California gun owners and two gun rights groups. In their lawsuit against the Department of Justice and California Attorney General Kamala Harris, they argued that the 10-day waiting period was unconstitutional.

“This is a great win for Second Amendment civil rights and common sense,” Jeff Silvester, one of the gun owners who was a plaintiff in the case, said in a statement. “I couldn’t be happier with how this case turned out.”

The other plaintiff Brandon Combs, who is also the executive director of the Calguns Foundation, also praised the ruling.

“California gun owners are not second-class citizens and the Second Amendment doesn’t protect second class rights,” Combs said. “This decision is an important step towards restoring fundamental individual liberties in the Golden State.”