A submachine gun, abbreviated SMG, is a magazine-fed, automatic carbine designed to fire handgun cartridges. The term "submachine gun" was coined by John T. Thompson, the inventor of the Thompson submachine gun, to describe its design concept as an automatic firearm with notably less firepower than a machine gun (hence the prefix "sub-"). As a machine gun must fire rifle cartridges to be classified as such, submachine guns are not considered machine guns.
The submachine gun was developed during World War I (1914–1918) as a close quarter offensive weapon, mainly for trench raiding. At its peak during World War II (1939–1945), millions of SMGs were made for use by regular troops, clandestine commandos and partisans alike. After the war, new SMG designs appeared frequently. However, by the 1980s, SMG usage decreased. Today, submachine guns have been largely replaced by assault rifles, which have a longer effective range and are capable of penetrating the helmets and body armor used by modern infantry. However, submachine guns are still used by military special forces and police SWAT teams for close quarters battle (CQB) because they are "a pistol-caliber weapon that's easy to control, and less likely to overpenetrate the target".