SAN FRANCISCO (AP/CBS13) – A U.S. appeals court ruled on Wednesday that California’s ban on the sale of semiautomatic weapons to adults under 21 is unconstitutional.

In a 2-1 ruling, a panel of the San Francisco-based 9th U.S. Circuit Court of Appeals said Wednesday the law violates the 2nd Amendment right to bear arms and a San Diego judge should have blocked what it called “an almost total ban on semiautomatic centerfire rifles” for young adults. “America would not exist without the heroism of the young adults who fought and died in our revolutionary army,” Judge Ryan Nelson wrote. “Today we reaffirm that our Constitution still protects the right that enabled their sacrifice: the right of young adults to keep and bear arms.”

READ MORE: WATCH: Bull Bucks Off Rider, Jumps Into Stands At Redding Rodeo; 5 People Hurt

The Firearms Policy Coalition, which brought the case, says the ruling makes them optimistic other age-based gun bans will be overturned

READ MORE: Quail Fire In Vacaville Now 90% Contained

Attorney General Rob Bonta did not immediately comment.

MORE NEWS: 'Their Choice And Not Ours': Elk Grove Family Speaks Out After Sudden Turn In Teen's Murder Case

Copyright 2022 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.