Firearm owners have no constitutional right to carry a concealed gun in public if they face no specific danger, a divided federal appeals court in California ruled on Thursday, in a victory for gun control advocates.

The decision by the 9th U.S. Circuit Court of Appeals, 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 San Diego and Yolo counties in California 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.

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.

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.

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 their weapons in concealment outside the home.

Gun rights group the California Rifle and Pistol Association declined to provide immediate comment.

In a dissenting opinion, Judge Consuelo Callahan wrote that the court had gone too far in limiting the right to concealed firearms. "The Second Amendment is not a 'second class' amendment," she wrote.

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.

(Reporting by Alex Dobuzinskis; Editing by Richard Chang)