A voter-approved Oregon gun control law violates the state constitution, a judge ruled Tuesday, continuing to block it from taking effect and casting fresh doubt over the future of the embattled measure.

The law requires people to undergo a criminal background check and complete a gun safety training course in order to obtain a permit to buy a firearm. It also bans high-capacity magazines.

The plaintiffs in the federal case, which include the Oregon Firearms Federation, have appealed the ruling to the 9th U.S. Circuit Court of Appeals. The case could potentially go all the way to the U.S. Supreme Court.