In the wake of two mass shootings in the space of 24 hours, there have been renewed calls from Democrats and some Republicans for increased regulation of firearms.

But what about the Second Amendment?

In fact, contrary to the rhetoric from Fox & Friends and the NRA, whatever Congress does or doesn’t do in response to El Paso and Dayton, the Constitution is not to blame.

Until 2008, the court had never held that the Second Amendment protects private gun ownership. The reason is obvious: unlike most constitutional clauses, the Second Amendment actually sets out a reason for the right in question. The text reads, in full (and with the odd punctuation in the original): “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.”

This is radically different from, say, the First Amendment, which simply states that Congress “shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press,” and so on. There’s no reason provided for these rights; they are simply set forth, and that’s that.

Thus, for over 200 years, the consensus among legal scholars was that the first clause limited the second clause: the right to keep and bear arms was for the purpose of maintaining a militia. This made historical as well as textual sense, since the context of the amendment was the early republic’s experience with tyranny imposed by a centrally controlled standing army and with the need for states to have militias.

That went out in the window in 2008 with the court’s ruling in D.C. v. Heller—but to repeat, the Supreme Court did not say that all gun control is unconstitutional.

The landmark Heller case was the perfect test case for the gun rights movement. At issue was one of the strongest gun control measures in the country: Washington, D.C.’s total ban on handgun possession, except for those licensed by the police chief (for one year, renewable terms), as well as the rule that guns had to be in a ‘trigger lock’ or similar safety device. (Even better for the gun rights movement, the plaintiff was a cop who wanted to keep a second handgun at home for personal protection.)

In a 5-4 decision along ideological lines, and in an opinion written by Justice Scalia, the court gave the National Rifle Association and its ilk what they’d wanted for decades: a constitutional right to bear arms. The “militia” language of the Second Amendment stated the purpose of the right, Justice Scalia held, but didn’t necessarily limit it. And several states had similar provisions which, historically, had indeed been held to protect an individual gun ownership right. And so on.

Crucially, however, like all constitutional rights, the right to gun ownership is not unlimited. Just as you can’t shout fire in the proverbial crowded theater, so too, you can’t stockpile weapons free of any regulation. In Justice Scalia’s words, it is “not a right to keep and carry any weapon whatsoever in any manner whatsoever and for whatever purpose.”

In particular, Justice Scalia strongly suggested that his reading of the Second Amendment would still allow laws prohibiting felons from owning guns, prohibiting the carrying of firearms near schools and government buildings, and “laws imposing conditions and qualifications on the commercial sale of arms.”

Even more importantly, Justice Scalia limited the Second Amendment right to the kinds of weapons “in common use at the time” of the amendment’s passage. Total bans on assault-style weapons are completely constitutional (though the law expired in 2004).

Remember, the D.C. law was extremely broad. Handguns are routinely kept for self-defense purposes, which is at the heart of the Second Amendment right. And the trigger-lock requirement makes them ineffective for that same purpose; if you have to spend 10 seconds unlocking your gun, you might be dead before you get to use it.

But all of the gun control measures being debated today would be perfectly constitutional under D.C. v. Heller.

Background checks, a federal gun database, and closing the ‘gun show loophole’? Absolutely (“conditions and qualifications on the commercial sale of arms”).

Bans on assault weapon and military-style rifles? Definitely (“M-16 rifles and the like” may be banned).

Large-capacity ammunition magazines? Almost certainly constitutional under Heller itself, though it wasn’t addressed directly in that case, and one federal district court has recently held that owning such magazines is protected by the Second Amendment.

So why the disconnect between the Constitution, as understood by the most pro-gun opinion in the history of the Supreme Court, and reality?

First, blaming the Constitution helps legislators dodge the ugly reality of gun rights. As has been surveyed many times, there is broad public support for these measures. But those opposed to them—chiefly gun manufacturers, but also the NRA’s core base—make it a central electoral issue. Few legislators are voted out of office for failing to pass control—but many are targeted, and defeated, for trying to do so. (This week, South Carolina Senator Lindsey Graham was attacked for his support of so-called “red flag” legislation to seize guns from select people.) So they’re scared.

This is a pretty gross state of affairs when mothers are shot dead protecting their babies from a white nationalist terrorist, so it’s a lot easier to say “our hands are tied—the Constitution says so.”

Second, as the old saw goes, if you repeat a lie often enough, it becomes the truth. Arguably that was true for the individual gun ownership right in the first place. Definitely it’s true for post-Heller gun control measures. Just keep saying that the constitution prohibits background checks and eventually enough people will believe it, the NRA’s position is further strengthened, and Fox News Nation becomes hardened in its view that even sensible gun control violates a sacred right.

Now, there’s one asterisk to everything I’ve said so far: it may be all about to change.

Currently on the Supreme Court’s docket this fall is a significant gun-rights case, New York State Pistol & Rifle Association v. City of New York, which challenges a New York ban on transporting handguns within New York City limits.

That case may not be heard after all, as New York has recently changed its rules and argued that the case is now moot. But if it does reach the court—which has not yet ruled on the mootness question—it will offer the newly-constituted, conservative-majority Supreme Court an opportunity to expand Heller and potentially invalidate a wide range of state and local gun rules.

There’s good reason to think that the court will do just that. Justice Neil Gorsuch has established himself as a libertarian, and Justice Brett Kavanaugh has opined in favor of an expansive understanding of the Second Amendment in the past. It’s possible that New York State Pistol & Rifle Association may rewrite the rulebook when it comes to the Constitution and guns.

Even so, there’s still an important distinction: Heller didn’t mention the transport restrictions at issue in the new case, but it did mention (and explicitly allow) most of the gun control rules being debated today.

The fact is, there’s no legal basis for claiming that the Constitution bans gun control. It’s just convenient for Senate Republicans to say so.