LOS ANGELES (Reuters) - Firearm owners have no constitutional right to carry a concealed gun in public, a divided U.S. appeals court in California ruled on Thursday, upholding the right of officials to only grant permits to those facing a specific danger.

Guns are seen inside a display case at the Cabela's store in Fort Worth, Texas, June 26, 2008. REUTERS/Jessica Rinaldi

The decision by the 9th U.S. Circuit Court of Appeals, a victory for gun control advocates which sets a legal precedent in western states, was seen as unlikely to be reviewed by the U.S. Supreme Court in the near future.

The San Francisco-based court, in a 7-4 decision, found California’s San Diego and Yolo counties did not violate the Second Amendment of the U.S. Constitution, which protects the right to bear arms, when they denied some applicants a concealed firearm license.

“We hold that the Second Amendment does not protect, in any degree, the carrying of concealed firearms by members of the general public,” Judge William Fletcher wrote in a 52-page opinion.

Sheriffs in the two California counties had limited their permits to applicants showing “good cause” to be armed, such as documented threats or working in a wide range of risky occupations.

The ruling places the 9th Circuit Court in line with other U.S. appellate courts that have upheld the right of officials in the states of New York, Maryland and New Jersey to deny concealed carry applications in certain cases.

The U.S. Supreme Court in 2013, in the middle of a raging national debate on guns, declined to weigh in on whether firearm owners have a constitutional right to carry concealed guns.

The 9th Circuit Court’s opinion noted the Supreme Court had not answered the question of whether the Second Amendment ensures a right to carry firearms openly, as opposed to concealed under clothing.

In a dissenting opinion, Judge Consuelo Callahan wrote that her colleagues on the 9th Circuit had gone too far. “The Second Amendment is not a ‘second class’ amendment,” she wrote.

Under California’s concealed carry law, more than 70,000 residents or less than 1 percent of the state’s population had active permits last year, according to the Center for Investigative Reporting.

California Attorney General Kamala Harris applauded the ruling while Chuck Michel, president of gun rights group the California Rifle and Pistol Association, criticized it.

“This decision will leave good people defenseless, as it completely ignores the fact that law-abiding Californians who reside in counties with hostile sheriffs will now have no means to carry a firearm outside the home for personal protection,” Michel said in a statement.

If plaintiffs appeal, the Supreme Court may refrain from reviewing the case because other U.S. circuit courts have also upheld certain requirements for concealed carry permits, said University of California, Los Angeles, law professor Adam Winkler in an email.

The decision by the full 9th Circuit reversed a 2-1 decision in 2014 by a panel of the appellate court that found California residents have an inherent right to a concealed weapon for self defense.