On Thursday, the 9th U.S. Circuit Court of Appeals concluded that the Constitution does not grant citizens the right to carry concealed firearms outside the home. The decision, Peruta v. San Diego, is likely to be the last word on this litigation: It was issued en banc, meaning the plaintiffs’ only remaining hope is a Hail Mary appeal to the Supreme Court, which makes a habit of avoiding gun cases these days. Even if the justices did take the case, it’s difficult to see how they could justify reversing Thursday’s ruling: The majority’s 41-page decision lays out a compelling, comprehensive analysis that that even fervid defenders of the right to bear arms should have trouble dismissing.

The 9th Circuit case centered on a challenge to California’s “good cause” law. Under the statute, members of the public may not publicly carry a concealed firearm unless they show “good cause.” County sheriffs are tasked with establishing policies to define “good cause,” and the sheriffs of two counties require a particularized reason why the applicant needs to publicly carry a firearm for self-defense. The plaintiffs in this case don’t have a specific reason to fear for their safety in public; they just really want to carry their guns around. So they challenged this interpretation of the “good cause” law in court, insisting that it violated their right to bear arms under the Second and Fourteenth amendments of the United States Constitution.

But this lawsuit was critically flawed from the start, because the Supreme Court’s watershed Second Amendment decision, D.C. v. Heller, confined its holding to the possession of firearms “in the home.” The Heller court also declared:

Like most rights, the right secured by the Second Amendment is not unlimited. From Blackstone through the 19th-century cases, commentators and courts routinely explained that the right was not a right to keep and carry any weapon whatsoever in any manner whatsoever and for whatever purpose. For example, the majority of the 19th-century courts to consider the question held that prohibitions on carrying concealed weapons were lawful under the Second Amendment or state analogues.

Admittedly, the court’s follow-up firearms case, McDonald v. Chicago, did contain some dicta about a broader “right to self-defense.” But in no way did it extend Heller’s logic to guarantee a right to self-defense outside of the home.

The Peruta court noted this confinement of Heller and McDonald to arms inside the home. Then, following the Supreme Court’s lead, the court surveyed the history of the Second Amendment to ascertain how states understood the right to bear arms in the 18th and 19th centuries. The Second Amendment’s predecessor, the 1689 English Bill of Rights, “protected the rights of Protestants to have arms”—but “flatly prohibited” concealed carry. Before the Civil War, every single state to address the question of concealed carry allowed prohibitions against concealed weapons under the Second Amendment or its state analogue. (Technically, exactly one state court had invalidated a concealed carry ban, but the decision was later overturned.)

In the decades following the Civil War and the ratification of the 14th Amendment—which applied much of the Bill of Rights to the states—this consensus grew. A number of states explicitly granted legislatures the authority to outlaw concealed carry, which legislatures quickly did. Every state court that heard challenges to these bans ruled the same way, upholding the constitutionality of concealed carry prohibitions. In 1897, the Supreme Court of the United States even asserted that “the right of the people to keep and bear arms is not infringed by laws prohibiting the carrying of concealed weapons.”

Until quite recently, in other words, there was a near-universal consensus among courts and legislatures that America’s Constitution, historical practices, and legal traditions do not create a right to carry concealed arms in public. That is enough, under Heller and McDonald, to reject the Peruta plaintiffs’ argument. Gun rights advocates may press legislatures to enact their policy preferences into law, but they cannot conjure a constitutional right to concealed carry this late in the game. And the 9th Circuit’s ruling in Peruta should give pause to activists who think they can use the courts to vindicate a right that never existed in the first place.