The first primitive firearms originated in 10th-century China, when bamboo tubes containing gunpowder and pellet projectiles were mounted on spears to make the portable fire lance, operable by a single person, which was later used to good effect in the Siege of De'an in 1132. In the 13th century, the Chinese invented the metal-barreled hand cannon, widely considered[by whom?] the true ancestor of all firearms. The technology gradually spread throughout the rest of East Asia, South Asia, the Middle East, and Europe. Older firearms typically used black powder as a propellant, but modern firearms use smokeless powder or other propellants. Most modern firearms (with the notable exception of smoothbore shotguns) have rifled barrels to impart spin to the projectile for improved flight stability.
Modern firearms can be described by their caliber (i.e. bore diameter). For pistols and rifles this is given in millimeters or inches (e.g. 7.62mm or .308 in.), or in the case of shotguns by their gauge (e.g. 12 ga. and 20 ga.). They are also described by the type of action employed (e.g. muzzleloader, breechloader, lever, bolt, pump, revolver, semi-automatic, fully automatic, etc.), together with the usual means of deportment (i.e. hand-held or mechanical mounting). Further classification may make reference to the type of barrel used (i.e. rifled) and to the barrel length (e.g. 24 inches), to the firing mechanism (e.g. matchlock, wheellock, flintlock, or percussion lock), to the design's primary intended use (e.g. hunting rifle), or to the commonly accepted name for a particular variation (e.g. Gatling gun).
Shooters aim firearms at their targets with hand-eye coordination, using either iron sights or optical sights. The accurate range of pistols generally does not exceed 100 metres (110 yd; 330 ft), while most rifles are accurate to 500 metres (550 yd; 1,600 ft) using iron sights, or to longer ranges whilst using optical sights. (Firearm rounds may be dangerous or lethal well beyond their accurate range; the minimum distance for safety is much greater than the specified range for accuracy). Purpose-built sniper rifles and anti-materiel rifles are accurate to ranges of more than 2,000 metres (2,200 yd; 1.2 mi).