After Monday’s mass shooting in Boulder, Colo., Congress is once again considering federal measures to curb gun violence: President Biden has proposed a ban on assault rifles and high-capacity ammunition magazines, among other steps. But revising state laws that prevent localities from regulating firearms should be no less a priority. That’s because, for all the heated rhetoric around the Second Amendment, state laws are a far more significant barrier to gun regulation than the Constitution. In Colorado and elsewhere, state laws keep cities and towns from passing measures that could prevent death and injury — and allow citizens to move through public spaces without fear.

The Supreme Court has never held that the Second Amendment forbids densely populated urban areas from reasonably regulating weapons within their borders, a common practice since the nation’s founding. Even after the Supreme Court’s 2008 decision in District of Columbia v. Heller established an individual right to keep and bear arms for certain private purposes — a significant shift in gun-related jurisprudence — relatively few gun laws have been struck down by courts. Indeed, Justice Antonin Scalia wrote in the majority opinion that Heller would not affect “longstanding prohibitions on the possession of firearms by felons and the mentally ill,” bans on guns in government buildings, or “laws imposing conditions and qualifications on the commercial sale of arms.” The court’s view of such matters could change, of course; the current lineup of justices seems poised to reshape Second Amendment doctrine in significant ways. But for the moment, at least, the Constitution is not the insurmountable obstacle feared by some advocates of regulation, nor the invincible champion imagined by their opponents.

State “preemption” laws, however, limit local officials’ power to impose gun restrictions beyond those set by Congress and the state government. Given the widespread inability or unwillingness to legislate on guns on Capitol Hill and in statehouses, that leaves little room for local action. Preemption laws strip local jurisdictions of the ability to tailor gun regulations to their particular circumstances — even when there is political support for doing so.

Consider the fate of Boulder’s attempt to regulate guns. After the mass shooting at a high school in Parkland, Fla., in 2018, Boulder tried to protect itself against similar threats by banning assault weapons and large-capacity magazines within city limits. A state court struck down that ordinance just a few days before a 21-year-old man carrying an assault weapon allegedly massacred 10 people in a King Soopers grocery store in the city. The judge’s decision had nothing to do with the Second Amendment: He ruled that Boulder’s restrictions violated Colorado’s preemption law.

Over the past several decades, the National Rifle Association and its allies have promoted such laws with great success. In 1979, seven states fully or partially preempted local firearm regulation. By 1989, 18 did so. Today, more than 40 preempt some or all local gun regulation. Some impose large fines on local governments or officials who do not toe the line — and require their removal from office. This is a legal transformation on par with the Heller decision — a sharp break from tradition.

Throughout American history, guns have been regulated more stringently in urban than in rural areas. Even Dodge City, Kan., and Tombstone, Ariz. — which loom large in gritty tales of the frontier West — prohibited gun-carrying within city limits. The logic is self-evident: In crowded urban areas, the consequences of gun misuse, including death and injury to bystanders, are higher. In rural areas, meanwhile, there are more opportunities for the lawful use of guns (recreational shooting and hunting, for example), and police response times tend to be longer, thus strengthening the self-defense argument for gun ownership. In a 1969 case in which a man challenged San Francisco’s gun registration requirement, arguing that the state did not require registration — and that state rules should trump local rules — the California Supreme Court wrote that it “should require no elaborate citation of authority” to conclude that “problems with firearms are likely to require different treatment in San Francisco County than in Mono County.” (San Francisco still has some ability to set its own gun laws; Dodge City and Tombstone do not.)

The costs of rigid uniformity are considerable. Most Americans live in urban areas, and a disproportionate number of gun-homicide victims die in them. Support for gun regulation is, unsurprisingly, higher in cities than in rural areas. And yet preemption laws forbid cities from imposing their own regulations to stem the violence.

Of course, some rules should be set at the state or federal level. Manufacturing requirements and background checks, for example, cannot be administered effectively by local governments. And there are constitutional and practical limitations on what local gun laws can achieve. Local prohibitions on classes of weapons, like the one Boulder attempted, can be partially undermined by lax regulation in neighboring jurisdictions. But that is not a reason to forbid such efforts. If AR-15s were illegal in Boulder, a person carrying one in public could immediately be stopped by police. And if the law proved popular and effective in that locale, other urban jurisdictions might follow suit. Rural Coloradans could still opt for a more permissive system, recognizing that AR-15s are used for hunting and recreation. By requiring one-size-fits-all rules, preemption laws forbid this kind of responsive local decision-making.

Supporters of preemption emphasize their desire to travel armed without fear of inadvertently violating local laws. The judge in the Boulder case, for example, suggested that “tourists may be dissuaded from visiting the area to avoid prosecution for otherwise lawful possession of a firearm.”

But until preemption laws swept the country, local officials could balance such considerations against other interests. After all, gun laws have an important role to play in protecting the public’s rights to peaceably assemble, speak, worship, vote — and shop for groceries — without fear of gun violence. The Second Amendment, as interpreted by the Supreme Court, incorporates that long-standing tradition.

When local communities seek to protect themselves with constitutionally sound gun laws, they invoke the same interest in personal safety that gun owners claim: They are attempting a form of self-defense.