The initial idea for a semiautomatic rifle goes back centuries — and appears to have roots in Philly.

In 1777, Benjamin Franklin wrote a letter to George Washington recommending the then-president commission the creation of rapid-fire muskets, also known as repeating arms, invented by Philadelphia resident Joseph Belton. Franklin wrote that the new muskets — which Belton called the Belton Flintlock — could be used by the military to destroy enemy war ships.

“I have discovered,” Belton wrote to Congress on April 11, 1777, “an improvement, in the use of Small Armes, wherein a common small arm, may be maid to discharge eight balls one after another, in eight, five or three seconds of time.”

And Washington agreed to it. In May 1777, he authorized Belton to make 100 of his rapid-fire muskets — but the plan fell apart before it even began, when Belton asked for what was deemed “unreasonable compensation” for his work.

A gunman used a modern semi-automatic rifle on Wednesday when he opened fire on a high school in Parkland, Florida and killed at least 17 people. The suspect, 19-year-old Nikolas Cruz, allegedly used an AR-15, which has been common in a handful of previous mass shootings (the same rifle was used in a mass shooting at an Orlando nightclub in 2016, and again at a Las Vegas music festival last year).

The National Rifle Association said the AR-15 is the “most popular” in the United States, estimating Americans own more than 8 million of them. The rifle is a hit, according to the Brady Campaign to Prevent Gun Violence, because it is customizable and easy to use — a statement from the campaign said the rifle “can basically shoot as quickly as you can pull the trigger.”

Gun control activists often argue that when the founding fathers drafted the Second Amendment — protecting the right of American citizens to bear arms — they couldn’t anticipate the power of modern firearms. Gun rights advocates dispute this claim, citing some of the first iterations of assault weapons that were invented long before the Constitution was written in 1776 (including the Belton Flintlock).

Other competing rapid-fire muskets — also known as repeaters — are said to have been developed around the same time as the Belton Flintlock. Only five years after Washington rejected Belton’s invention, another rifle called the Nock Volley Gun was developed. It fired seven shots all at once from clustered bores, and was used predominantly during naval warfare.

Centuries before that, circa 1590, some manufacturers developed a .67-caliber rifle that could fire 16 stacked charges of gun powder and a ball in a rapid “Roman candle” fashion.

Modern automatic weapons are much more rapid. At Pulse Nightclub in Orlando, the shooter got off 24 shots in 9 seconds, per a New York Times investigation. In Vegas, a bump stock-outfitted rifle allowed the shooter to fire about 90 shots in 10 seconds.

No other country has as high a rate of mass shootings as the United States. According to a separate NYT report, “Americans make up about 4.4 percent of the global population but own 42 percent of the world’s guns.”

Despite gun rights advocates sharing alleged images of the Belton Flintlock on social media, there are no known surviving examples of Belton’s gun, and the correspondence among Franklin, Washington and Belton is the only concrete evidence the guns ever existed.