On Friday, a Saudi aviation student killed three people at the Naval Air Station in Pensacola, Florida. The FBI said it will conduct its investigation “with the presumption that this was an act of terrorism.”

Then, on Tuesday, gunmen with potential links to the Black Hebrew Israelite movement, which has been labeled a hate group by the Southern Poverty Law Center, killed four others at a kosher supermarket in Jersey City, New Jersey.

The investigations into both shootings are still in the very early stages, but both appear to be forms of terrorism or hate crimes. Officials in Jersey City first said the gunmen seemed to randomly choose the kosher market for the shooting, but Mayor Steven Fulop has since said that “we now believe the active shooters targeted the location they attacked” — making the shooting, potentially, an anti-Semitic attack.

We’re sure to learn a lot more about the shooters and their motives in the coming days, weeks, and months, including whether these truly were terrorist attacks or hate crimes.

But we already know one thing: America’s weak gun laws make it much easier to commit shootings like these. This is a widely known fact, including among terrorist groups. Back in 2011, a now-dead American al-Qaeda operative, Adam Gadahn, said as much in a video to supporters:

In the West, you’ve got a lot at your disposal. Let’s take America for example. America is absolutely awash with easily obtainable firearms. You can go down to a gun show at the local convention center and come away with a fully automatic assault rifle without a background check, and most likely without having to show an identification card. So what are you waiting for?

Gadahn’s assertions weren’t quite right. (Fully automatic weapons are highly regulated in the US, though semiautomatic assault weapons can be bought at stores and gun shows.) But the sentiment is true: It is fairly easy for just about anyone with any motive to get a gun in the US and to use it for horrible attacks, because the country’s gun laws are so lax and make it so easy to get a firearm.

We already know, for example, that the Pensacola shooter managed to obtain the handgun he used legally by showing a valid hunting license, which is one of the exceptions that let foreign nationals obtain firearms in the US. This is the type of loophole that’s popped up again and again in the aftermath of mass shootings.

So once again, the problem here is the guns. No other country in the world has as many guns as the US, and other developed nations have significantly stricter gun laws. That’s what makes America so vulnerable, both to shootings motivated by extremist views and to other kinds of gun violence.

America’s gun problem, briefly explained

Every country is home to extremists and other hateful individuals. People of every country get into arguments and fights with friends, family, and peers. But in the US, it’s much more likely that someone who’s extreme, hateful, or otherwise angry is able to pull out a gun and kill someone — there are so many guns around and few barriers to obtaining the weapons.

It comes down to two basic problems.

First, America has uniquely weak gun laws. Other developed nations require one or more background checks (at the very least) to purchase a gun, and almost always something more rigorous beyond that, from specific training courses to rules for locking up firearms to more arduous licensing requirements to specific justifications, besides self-defense, for wanting to own a firearm.

In the US, even a background check isn’t an absolute requirement: Current federal law is riddled with loopholes and hampered by poor enforcement, so there are many ways around even basic background checks. And if a state enacts measures that are stricter than federal laws, someone can simply cross state lines to buy guns in a jurisdiction with looser rules. There are simply very few barriers, if any, to getting a gun in the US.

Second, the US has a ton of guns. It has far more than not only other developed nations but also any other country, period. In 2017, the estimated number of civilian-owned firearms in the US was 120.5 guns per 100 residents, meaning there were more firearms than people. The world’s second-ranked country for guns was Yemen, a quasi-failed state torn apart by civil war, where there were 52.8 guns per 100 residents, according to an analysis from the Small Arms Survey.

These factors combined make it uniquely easy for someone with violent intent to find a firearm, allowing them to carry out a horrific shooting.

This is borne out in statistics that show America experiences far more gun violence than other developed nations. The US has nearly six times as many gun homicides as Canada, more than seven times that of Sweden, and nearly 16 times that of Germany, according to UN data for 2012 compiled by the Guardian. (These gun deaths are one reason America has a much higher homicide rate, which includes non-gun deaths, than the rest of the developed world.)

If having so many guns around actually made the US safer, as the National Rifle Association and pro-gun politicians claim, America would have one of the lowest rates of gun violence in the world. But the statistics suggest that, in fact, the opposite is true.

The research, compiled by the Harvard School of Public Health’s Injury Control Research Center, is also pretty clear: After controlling for variables such as socioeconomic factors and other crime, places with more guns have more gun deaths. Researchers have found this to be true not only with homicides but also with suicides (which, in recent years, comprised around 60 percent of US gun deaths), domestic violence, violence against police, and mass shootings.

As a breakthrough analysis by UC Berkeley’s Franklin Zimring and Gordon Hawkins in the 1990s found, it’s not that the US has more crime than other developed countries. This chart, based on data from Jeffrey Swanson at Duke University, demonstrates that the US is not an outlier when it comes to overall crime:

Instead, the US appears to have more lethal violence specifically, driven in large part by the prevalence of guns.

“A series of specific comparisons of the death rates from property crime and assault in New York City and London show how enormous differences in death risk can be explained even while general patterns are similar,” Zimring and Hawkins wrote. “A preference for crimes of personal force and the willingness and ability to use guns in robbery make similar levels of property crime 54 times as deadly in New York City as in London.”

Researchers have found that stricter gun laws could help. A 2016 review of 130 studies in 10 countries, published in Epidemiologic Reviews, found that new legal restrictions on owning and purchasing guns tend to be followed by a drop in gun violence, a strong indicator that restricting access to guns can save lives. A review of the US evidence by RAND also linked some gun control measures, including background checks, to lower rates of injuries and deaths. A growing body of evidence from Johns Hopkins researchers further supports the efficacy of laws that require a license to buy and own guns.

That doesn’t mean bigots and extremists will never be able to carry out shootings in places with stricter gun laws. Even the strictest gun laws can’t prevent every shooting.

Guns are not the only contributor to violence, either. Other factors include, for example, poverty, urbanization, alcohol consumption, and the strength of criminal justice systems.

But when researchers control for other confounding variables, they have found time and time again that America’s loose access to guns is a major reason the US is much worse off than its developed peers in terms of gun violence.

With its lax laws and abundance of firearms, America makes it uniquely easy for people to commit horrific gun violence. Until the US confronts that issue, it will continue to see mass shooting after mass shooting — including some that may be hate crimes or acts of terrorism.

For more on America’s gun problem, read Vox’s explainer.