The U.S. Supreme Court declined Monday to decide whether the Constitution provides a right to carry a handgun in public, passing up a major issue about firearm owners' rights simmering nationwide.

The court said it would not examine a California law that requires showing "good cause" in order to get a permit to carry a concealed weapon. As a practical matter, the law makes it difficult for most people to get a permit in the state's urban areas.

Five residents of San Diego went to court challenging their local sheriff's interpretation of the law, which said an applicant must show some particular need for a permit. Licenses are not issued based on fear alone.

"There are few unresolved constitutional questions of greater legal and practical significance than whether the Second Amendment entitles ordinary, law abiding citizens to bear handguns outside the home for self defense," said Washington, D.C. lawyer Paul Clement, representing the challengers.

In June 2016, the 9th Circuit Court of Appeals, after analyzing the history of American gun laws, ruled that that "the Second Amendment does not protect in any degree the right to carry concealed firearms in public."

It therefore said, in a 7-4 ruling, that "any prohibition or restriction a state may choose to impose on concealed carry — including the requirement of 'good cause,' however defined -- is necessarily allowed by the Amendment."

The ruling caused an uproar among advocates of gun rights but was celebrated by gun control groups.

California already bans openly carrying firearms in public. A challenge to that law is pending in a separate case.

Justice Clarence Thomas, in a dissent joined by Justice Neil Gorsuch, said the Supreme Court should have taken up the appeal. Not to do so, they said, amounts to treating the Second Amendment as a disfavored right.

"For those of us who work in marbled halls, guarded constantly by a vigilant and dedicated police force, the guarantees of the Second Amendment might seem antiquated and superfluous," Thomas wrote.

"But the Framers made a clear choice: they reserved to all Americans the right to bear arms for self-defense. I do not think we should stand by idly while a state denies its citizens that right, particularly when their lives may depend on it."

Undated view of the justice statue, Supreme Court, Washington. Paul Whitfield / Getty Images/Dorling Kindersley

Xavier Becerra, California'a attorney general, urged the Supreme Court not to take the case. The state forbids the carrying of guns only in places "where the presence of private arms, open or concealed, would present the greatest risk to other members of the public, he said" Guns are allowed in many unincorporated areas and while hunting or camping, Becerrra said.

Most states issue concealed carry permits and do not require showing a special need.

Six states — Delaware, Hawaii, Maryland, New Jersey, New York, and Rhode Island — have laws similar to California's, requiring gun owners to provide a reason for getting a concealed carry permit. Stating a general need for self defense is not enough.

After issuing its landmark ruling in 2008 that the Second Amendment provides a right to keep a handgun at home for self defense, the Supreme Court has repeatedly declined to step back into the issue. The justices denied review of more than five dozen cases intended to test the reach of gun laws outside the home.

That was so even when Justice Antonin Scalia, who wrote the 2008 decision, was still on the court.