A federal appeals court ruled Tuesday to uphold California laws banning gun shows at county fairs and other public properties in a 3-0 decision.

The 9th Circuit Court of Appeals ruled that the two measures do not violate the rights of firearm sellers or buyers. The ruling on Tuesday overturns a federal judge's ruling in October that blocked the laws.

State Sen. Dave Min, a Democrat, introduced both laws: the first went into effect in January 2022 and prohibited gun shows at the Orange County Fair, while the other went into effect last year and extended the ban to county fairgrounds on state-owned land.

U.S. District Judge Mark Holcomb wrote in his decision last year that the state was violating the rights of gun sellers and potential buyers by barring purchases of firearms that can be bought at any gun store and that lawful gun sales involve commercial speech protected by the First Amendment.

GAVIN NEWSOM'S ANTI-GUN CONSTITUTIONAL AMENDMENT FAILS TO GAIN SUPPORT FROM A SINGLE STATE AFTER 1 YEAR

Democrat state Sen. Dave Min

Democratic California state Sen. Dave Min wrote both laws that were challenged in this case. (AP Photo/Rich Pedroncelli, File)

The appeals court, however, ruled that the laws only ban sales agreements on public property and do not limit discussions, advertisements or other speech about firearms. 

Judge Richard Clifton wrote that the bans "do not directly or inevitably restrict any expressive activity."

Clifton said that a separate state law that was not challenged in the case states that the actual purchase of a firearm at a gun show is completed at a licensed gun store after a 10-day waiting period and a background check.

California Attorney General Rob Bonta praised Tuesday's decision after defending the laws in court.

"Guns should not be sold on property owned by the state, it is that simple," Bonta said in a statement. "This is another victory in the battle against gun violence in our state and country."

Gun-control groups have claimed the gun shows present dangers by making firearms attractive to children and enabling "straw purchases" for people ineligible to possess guns.

CALIFORNIA GROUP SECURES SIGNATURES TO LAND PROP 47 REFORM PENALIZING CRIMINALS ON NOVEMBER BALLOT

Rob Bonta

California Attorney General Rob Bonta praised the appeals court ruling after defending the laws in court. (Loren Elliott/Bloomberg via Getty Images)

The case came after a lawsuit by gun show company B&L Productions, which argued that the ban on fairgrounds sales violated the Second Amendment right to keep and bear arms. But the appeals court disagreed, writing that there were six licensed firearms dealers in the same ZIP code as the Orange County Fairgrounds, where the 2022 law banned gun sales.

Attorney Chuck Michel, president of the California Rifle & Pistol Association, the state affiliate of the National Rifle Association, said the ruling would be appealed.

CLICK HERE TO GET THE FOX NEWS APP

"CRPA will continue to protect the despised gun culture and fight back against an overreaching government that seeks to limit disfavored fundamental rights and discriminate against certain groups of people on state property," Michel said in a statement to the San Francisco Chronicle.

Min applauded the ruling on Tuesday, saying in a statement that the appeals court upholding the laws will make Californians safer. 

"I hope that in my lifetime, we will return to being a society where people's lives are valued more than guns, and where gun violence incidents are rare and shocking rather than commonplace as they are today," Min said.

The Associated Press contributed to this report.