Any time a shooter opens fire in a school, a church or anywhere else, the consequences can be deadly. But the danger is about double when a semiautomatic weapon is involved.

In the United States, shootings that involved a semiautomatic rifle resulted in nearly twice as many deaths compared with shootings carried out with regular handguns, shotguns or rifles, according to a report published Tuesday in the Journal of the American Medical Association. Nonfatal injuries were significantly higher as well.

In other words, the study authors noted, the weapons work exactly as intended.

"Semiautomatic rifles are designed for easy use, can accept large magazines, and fire high-velocity bullets, enabling active shooters to wound and kill more people per incident," they wrote.

The researchers, from the Center for Surgery and Public Health and the Department of Emergency Medicine at Brigham and Women's Hospital in Boston, cataloged every assault between 2000 and 2017 that met the Federal Bureau of Investigation's definition of an active shooter incident. In these cases, one or more individuals are "actively engaged in killing or attempting to kill people in a populated area."

FBI data on active shootings in the U.S. includes information on the city where each incident occurred and whether it took place in a school, business, government building, residence, health care setting, place of worship or an open space. The database also lists the number of people injured and killed in each incident and whether rifles, shotguns or handguns were present at the scene.

These FBI records do not say whether the rifles used in such shootings were semiautomatic — such weapons were banned during the early years of the study period, thanks to a federal law that expired in 2004 — so the researchers did their best to figure it out for themselves.

First they scoured police and court records to see how the rifles were described in official records. If that didn't clear things up, they moved on to news accounts, requiring three separate sources to "triangulate" the truth.

Two infamous mass shootings were excluded from the analysis. The 2017 Las Vegas shooting (which resulted in 59 deaths and 851 injuries) was deemed a statistical outlier, and the 2015 San Bernardino attack (which left 16 dead and 24 injured) had two active shooters instead of one, the researchers explained.

Without them, the researchers tallied 248 active shooter incidents between 2000 and 2017. Their combined toll was 718 deaths and 898 injuries.

The most common weapon was a handgun, used in 154 of the 248 shootings. Semiautomatic rifles came in second, playing a role in 61 — or just under 25 percent — of the events.

On average, a shooting that featured a semiautomatic weapon (sometimes in combination with other firearms) resulted in 4.25 deaths and 2.49 injuries. Meanwhile, shootings without a semiautomatic weapon left 2.49 people dead and 3.02 injured, on average.

After accounting for factors like the place where an incident occurred, the year, and whether multiple weapons were involved, the researchers calculated that:

• Shootings resulted in 97 percent more deaths when a semiautomatic rifle was part of the mix.

• The number of people injured was 81 percent higher when a semiautomatic rifle was present.

• The total number of casualties was 91 percent higher in cases involving a semiautomatic rifle.

If an active shooter used a semiautomatic firearm, 43.7 percent of the people who were shot were killed. In shootings that did not feature a semiautomatic weapon, 44.9 percent of those who were shot ultimately died from their injuries. That difference was too small to be statistically significant, the researchers determined.

The researchers lamented that they could not learn more from these shootings due to the limitations of the FBI data. For instance, details about the injuries suffered by victims might help them pinpoint how much additional danger — if any — a semiautomatic weapon presents.

They also speculated that the intentions of shooters who wield semiautomatic firearms might be different from those of other shooters.

"This lack of data highlights the need for a national centralized database to inform the debate on an assault weapons ban," the researchers wrote.