The AR-15, the type of rifle used in the deadliest mass shooting in U.S. history, is the weapon of choice for mass killers.

Omar Mateen used a Sig Sauer AR-15 rifle, and also a Glock handgun, in his murder of 49 people at a gay nightclub in Orlando on Sunday, according to the FBI. He shot more than 100 people, including survivors, before he was gunned down by police.

UPDATE: After this story was published, officials specified that the guns used in the Orlando shooting were a Sig Sauer MCX assault-style rifle, which uses standard AR-15 magazines and ammunition, and a Glock 9mm semiautomatic pistol.

The AR-15, which has been used by the U.S. military in every war since Vietnam, has also served as a murder weapon in some of the most horrific mass shootings. AR-15s were used to kill and maim crowds of innocent people at Sandy Hook Elementary in Newtown, Connecticut; a movie theater in Aurora, Colorado; and a workplace party in San Bernardino, California.

It wasn't supposed to be this way, of course.

The AR-15 was developed by Eugene Stoner, a former Marine, for a California startup in the 1950s called ArmaLite.

AR stands for Armalite, not assault rifle. Armalite, which has been bought and sold by various gun companies over the decades, is still producing AR-15s to this day.

Related: Florida's an easy state to buy a gun

The Nazis invented the assault rifle with a weapon called the sturmgewehr, and Soviet engineer Mikhail Kalashnikov followed that up with the AK-47, now the most widely used assault rifle in the world. The burly AK, with its 30-round magazines, is what the U.S. military was competing with in the Cold War.

Stoner's AR-15 was America's answer to the Viet Cong and the North Vietnamese Army. It was tweaked into the M-16, a lightweight rifle with a plastic stock and a funky-looking handle on the top, that shot relatively low caliber bullets (.223.) No one had ever seen anything like it.

Guns weren't supposed to look like that. In his book "The Gun," New York Times reporter C.J. Chivers calls the M-16 "synthetically futuristic."

Chivers continues: "To its champions, the AR-15 was an embodiment of fresh thinking. Critics saw it as an ugly little toy."

The M-16 was used by U.S. soldiers in Vietnam. It was initially notorious for jamming during combat, but it has evolved over the years into a modern firearm favored by soldiers and civilians.

Related: The recent rise and fall of the AR-15

AR-15-style rifles are made by many companies and come in many shapes and sizes. U.S. soldiers and Marines source many of their AR-15s from Colt, which produces the M4, a short, squat version of its M-16 ancestor.

Smith & Wesson (SWHC) is also a prominent manufacturer, with its M&P (military & police) line of AR-15s. Daniel Defense also supplies its own style of AR-inspired rifles to the military and law enforcement. Makers of AR-style guns also include Sturm Ruger (RGR), Remington, Bushmaster, Century Arms, Stag Arms, and many others.

Civilians like AR-15s not only because they're legal in many states, but because they pack serious firepower and they're user friendly. They have limited recoil, which helps with accuracy.

Gun enthusiasts, who often shoot for sport at ranges, use the term "modular" when describing ARs because they can be easily modified with a plethora of add-ons including sights, silencers, handles, bipods, sling mounts, lights, bayonet lugs and Lego-like rails to attach even more add-ons.

Related: Gun sales drive demand for AR-15s

More importantly, AR-15s can use high-capacity magazines, defined as any magazine that contains more than 10 rounds. They're illegal in New York, Connecticut and several other states, but they're legal in most.

High capacity banana-shaped magazines typically contain 30 rounds, putting them on par with AK-47s. The Florida magazine company TorkMag makes them even bigger, containing 35 or 50 rounds. Drum-shaped magazines can contain 100 rounds, like the weapon used by James Holmes, who shot 82 people at a movie theater in Colorado in 2012, killing 12 of them.

Unfortunately, the compact, easy-to-use lethality of the AR-15 has made it the weapon of choice in mass shootings.