A federal judge ruled Tuesday that California’s ban on handgun advertising is unconstitutional.

Judge Troy Nunley of the U.S. District Court for the Eastern District of California, an Obama appointee, ruled California could no longer enforce Section 26820 of the California Penal Code, which dates back to 1923. That law banned gun stores from displaying signs promoting the sale of handguns. California argued the ban was necessary to prevent suicides and murders but Judge Nunley said it violates constitutional protections on free speech.

"California may not accomplish its goals by violating the First Amendment," Nunley wrote in his ruling. "Accordingly, [the law] is unconstitutional on its face."

The state argued that preventing the advertisement of handguns lessened the chance that impulsive people, whom the state argued were more prone to self-harm and violence, would buy a handgun and, therefore, be less likely to commit suicide or violence against others. Judge Nunley was unconvinced by this argument for why the state can restrict constitutionally protected commercial speech.

"The Government may not restrict speech that persuades adults, who are neither criminals nor suffer from mental illness, from purchasing a legal and constitutionally protected product, merely because it distrusts their personality trait and the decisions that personality trait may lead them to make later down the road," Nunley wrote. "Moreover, in the effort to restrict impulsive individuals from purchasing handguns, the Government has restricted speech to all adults, irrespective of whether they have this personality trait. Therefore, the Government impermissibly seeks to achieve its goals through the indirect means of restricting certain speech by certain speakers based on the fear that a certain subset of the population with a particular personality trait could potentially make what the Government contends is a bad decision."

The case was brought by the Second Amendment Foundation, Calguns Foundation, California Association of Federal Firearms Licensees, and a collection of firearms dealers. The plaintiffs celebrated Judge Nunley’s ruling and decried the ban as an afront to the First and Second Amendments.

The Calguns Foundation said gun dealers have a right to advertise their legal products. "Today, the court correctly ruled that the First Amendment protects truthful, non-misleading speech about handguns protected under the Second Amendment," Brandon Combs, executive director of the group, said in a statement. "People have a fundamental, individual right to buy handguns, and licensed dealers have a right to tell people where they can lawfully acquire those handguns. Today’s ruling means that the government cannot prevent people, or gun dealers, from talking about constitutionally protected instruments and conduct."

The Second Amendment Foundation said the ruling ensures the constitutional rights of gun dealers are protected. "This decision will serve as a reminder that firearms dealers have First Amendment rights as well as Second Amendment rights, even in California," Alan M. Gottlieb, the group’s founder, said. "The bottom line is that a state cannot legislate political correctness at the expense of a fundamental, constitutionally enumerated right. We are delighted to offer financial support of this case."

The office of California Attorney General Xavier Becerra told the Washington Free Beacon it was reviewing the ruling but did not say whether or not they would appeal it.