A well-regulated militia, being necessary to the security of a free State, the right of the People to keep and bear arms shall not be infringed. — Second Amendment to the Constitution of the United States

In the wake of recent mass shootings in El Paso, Texas, and Dayton, Ohio, the biggest obstacle to effective gun control may not be President Trump, Mitch McConnell or even the National Rifle Association (NRA) but the United States Supreme Court.

It’s been a long time since the Supreme Court considered a major Second Amendment case. Eleven years ago, the court delivered a landmark victory to the gun-rights lobby in District of Columbia v. Heller—a 5-4 majority decision written by the late Justice Antonin Scalia that ruled, for the first time, the Second Amendment protected an individual right to own and bear firearms.

Heller broke with the great weight of prior scholarship and legal precedent, including the Supreme Court’s 1939 decision in United States v. Miller, which held the Second Amendment protected gun ownership only in connection with service in long-since antiquated state militias. And while Heller was technically limited to gun ownership in the nation’s capital and other federal venues, the court extended its individual-rights analysis to the states two years later in McDonald v. Chicago, via a 5-4 opinion authored by Justice Samuel Alito.

When the court reconvenes in October, its docket will include a new Second Amendment appeal—New York State Rifle & Pistol Association Inc. v. City of New York—that has the potential to rival or surpass Heller for its impact on gun rights and gun regulation.

At issue is a New York City ordinance adopted in 2001 barring residents from taking their guns outside city limits. The ordinance was challenged in a federal lawsuit filed by the NRA’s New York affiliate and three city residents, who argued the regulation was unconstitutional in light of Heller.

The plaintiffs lost at both the district court level and before a three-judge panel of the Second Circuit Court of Appeals, which issued a unanimous decision in February 2018 concluding the ordinance withstood Second Amendment scrutiny under Heller. The Supreme Court agreed in January to review the case.

As the 2nd Circuit noted in its evaluation of the New York ordinance, Heller was technically limited to possession of guns in the home, and by no means precluded reasonable gun legislation outside of it. Scalia wrote in his majority decision:

“Like most rights, the right secured by the Second Amendment is not unlimited. … Although we do not undertake an exhaustive historical analysis today of the full scope of the Second Amendment, nothing in our opinion should be taken to cast doubt on longstanding prohibitions on the possession of firearms by felons and the mentally ill, or laws forbidding the carrying of firearms in sensitive places such as schools and government buildings, or laws imposing conditions and qualifications on the commercial sale of arms.26”

In footnote 26 of the opinion, placed at the end of the above paragraph, he added:

“We identify these presumptively lawful regulatory measures only as examples; our list does not purport to be exhaustive.”

What made Heller and McDonald attractive to the NRA as test cases was that each concerned near-total bans on gun possession by private citizens. Outright prohibitions are rarely easy to justify, and the five-member conservative Supreme Court majority in each instance reinterpreted the Second Amendment to strike down prohibitions.

Like Heller and McDonald, the New York City case presents an outright ban not on ownership, but on the right to bear arms beyond the home.

Realizing it could easily lose before the Supreme Court, New York City announced in June it had amended the transportation ordinance and would henceforth permit licensed gun owners to take their firearms to second homes, businesses or shooting ranges outside city limits. In July, the city filed a formal motion with the Supreme Court, requesting that the case be dismissed because the ordinance was no longer in effect. The court is scheduled to consider the motion in its first closed-door conference of the new term on Oct. 1.

If the Supreme Court consisted of open-minded jurists committed to a fair understanding of the Constitution, the city would likely prevail. Indeed, the case might even offer an opportunity to repudiate Heller as a misguided application of “originalism,” the legal theory popularized by Scalia that posits the Constitution should be interpreted according to its meaning for the Founding Fathers.

Along with many other critics of originalism, I believe the Constitution should be read as a “living document,” taking into account not only the Constitution’s text and history but also giving due consideration to contemporary values, social needs and evolving traditions.

Still, even on strictly originalist grounds, Heller was wrongly decided. As Justice John Paul Stevens explained in his Heller dissent, “the Framers’ single-minded focus in crafting the constitutional guarantee ‘to keep and bear arms’ was on military uses of firearms, which they viewed in the context of service in state militias.”

Scalia’s majority opinion not only rendered the opening “militia clause” of the Second Amendment meaningless, it also distorted and minimized the historical debate surrounding its inclusion in the Bill of Rights. Those debates, Stevens emphasized, centered on the state militias as antidotes to a burdensome and potentially oppressive permanent standing federal army, not on personal gun ownership.

As Alexander Hamilton argued in Federalist Paper No. 29, militias were seen as “the most natural defense of a free country.” Prior to the Constitution’s ratification, the Massachusetts militia was called out to quell Shay’s Rebellion, the anti-tax protest of farmers in 1786-87 that exposed the weaknesses of the fledgling national government as constructed under the Articles of Confederation. Soon after ratification, the militias of New Jersey, Maryland, Virginia and Pennsylvania were federalized to put down another anti-tax uprising, the Whiskey Rebellion of 1791-94, that had erupted in western Pennsylvania.

In the end, the Second Amendment was worded as a federalist compromise, with the states retaining their right to organize militias and other provisions of the Constitution—for example, Article II, Section 2—clarifying that ultimate control over the militias would vest in the executive branch of the federal government. Personal gun rights were left, as they had been during the colonial period, to the police powers of local government.

Following Heller, historian Jack Rakove of Stanford University panned Scalia’s scholarship as an example of shoddy “law-office history,” while Fordham University’s Saul Cornell called it “a constitutional scam” and “an intellectual shell game in which contemporary political preferences are shuffled around and made to appear part of the Constitution’s original meaning.”

Tragically for the country, Scalia’s revisionist interpretation of the Second Amendment prevailed in Heller, assuming the status of Holy Writ among judges and mainstream politicians.

With the addition of Trump appointees Neil Gorsuch and Brett Kavanaugh, today’s Supreme Court may be even more pro-gun than it was when Scalia penned Heller. Should New York City’s motion to dismiss be denied, the court could easily extend its decision in radical new directions, imperiling any serious efforts to pass and enforce federal gun control. That prospect should alarm every American anguished by the county’s escalating gun violence.