# Firearms

> From the match to the automatic gun

- Date: c. 1288
- Era: Middle Ages
- Domain: [Defence & Fortification](https://lastcodex.org/en/domains/defense/)
- Rebuild stage: III (Crafts & cities)
- Difficulty: 4/5
- URL: https://lastcodex.org/en/inventions/firearms/

A firearm throws a projectile out of a tube with the gas of burning gunpowder. Chinese soldiers carried bronze hand guns by the late thirteenth century, and one found in Heilongjiang is dated from its context to about 1288. Over the following six centuries the way of lighting the charge passed from a hand-held match to the matchlock, the flintlock and the percussion cap, loading moved to the breech, and in 1884 Hiram Maxim patented a gun that used each shot to load and fire the next.

![Firearms · From the match to the automatic gun](https://lastcodex.org/_astro/plate.BaQxjkKj_t9fEb.webp)

## Legend

1. Matchlock: serpentine holding a smouldering match
2. Flintlock: cock holding a flint above the steel
3. Percussion lock: hammer above the cap
4. Needle gun: handle of the sliding bolt
5. Maxim gun: water jacket around the barrel

## What it is

A firearm is a weapon that throws a projectile with the pressure of gas from burning powder. Its main part is a strong tube, the barrel, closed at the rear. A charge of [gunpowder](/en/inventions/gunpowder/) and a ball or a bullet lie at the closed end. When the charge is lit, the gas it gives off drives the projectile out of the open end, the muzzle. Cannon work the same way, but the words firearm and small arm usually mean a gun that one person can carry and fire.

Every firearm also needs a way to light the charge at the moment the shooter chooses. That mechanism is called the lock, a name it owes to the locksmiths who made the first ones. Much of the history of firearms is the history of the lock: a match held by a lever, then sparks from a spinning wheel or a flint, then a cap that fires when struck, and finally a mechanism worked by the gun itself. A new system rarely replaced the old one at once. Matchlocks and wheellocks were still in use in the eighteenth century, long after the flintlock had become the standard arm of European and American armies.

## How it works

Gunpowder burns very fast, and the gas it releases builds up pressure behind the projectile and pushes it along the barrel and out of the muzzle. The same push drives the gun back against the shooter, which is the recoil. Spiral grooves cut inside the barrel, called rifling, make the bullet spin, so that it flies straighter than a ball from a smooth barrel.

![A heavy matchlock musket resting on a wooden forked rest planted in the ground, a coil of match cord hanging from the stock and its glowing end held in the curved lever beside the lock](https://lastcodex.org/_astro/v1.Cb1FfUQW_1sQUjj.webp)
_The first muskets were so heavy that the soldier laid the barrel on a forked rest to aim._

The earliest hand guns were fired with a lit match held in the hand. The matchlock held the match in an S-shaped lever, the serpentine, so that the gunner could aim with both hands. The match had to be kept smouldering all the time, and wind and rain could put it out.

The wheellock made its own sparks with a spinning steel wheel rubbing on a piece of pyrite, and the flintlock with a flint striking a piece of steel, as in a tinderbox. The flint was held in a pivoting arm called the cock. Flintlocks misfired more often than matchlocks, but they had fewer delicate parts than wheellocks and cost less. The percussion lock did away with sparks: its hammer struck a small copper cap that fires on impact.

Until the nineteenth century, almost every gun was loaded from the muzzle. A breech-loader opens at the rear instead. The Prussian needle gun of Johann Nikolaus Dreyse opened and closed with a sliding bolt worked by a handle, and used a paper cartridge that held bullet, powder and primer together. The paper cartridge made loading faster; the metal cartridge case that came later sealed the breech against escaping gas.

An automatic gun uses part of the energy of each shot to work its own mechanism, and goes on firing for as long as the trigger is held. In the Maxim gun that energy came from the recoil, and a jacket of water around the barrel carried away the heat of sustained fire. Later guns drew on the recoil or the gas of the shot in other ways.

## History and evolution

Gunpowder weapons began in China with the fire lance, a tube of powder tied to a spear, and metal guns followed in the thirteenth century. A bronze hand gun found in Heilongjiang province carries no inscription, but its find site links it to fighting recorded in 1288. Another bronze gun, found at Xanadu, the summer capital of Kublai Khan, bears a date corresponding to 1298, and two metal guns from Gansu may be older still. Guns reached Europe in the 1320s: a treatise that Walter de Milemete wrote for the young Edward III of England in 1326–1327 contains a picture of one.

For more than a century, a European hand gun remained a small barrel fixed to a wooden staff and fired by hand with a match. The matchlock appeared in the fifteenth century, probably first in Germany, and gave the gun a shaped stock and a mechanism that let one soldier aim and fire. The arquebus and the heavier musket, which needed a forked rest, became the weapons of the infantry, and the matchlock changed little in essentials until the end of the seventeenth century.

![A sixteenth-century German wheellock pistol lying on a table, long and slender with a ball-shaped pommel, the flat lock plate on its side carrying the round cover of the wheel and the arm that holds the pyrite](https://lastcodex.org/_astro/v2.rxA7ax6K_ZF2efL.webp)
_A wheellock pistol could be carried loaded in a holster, which made it the weapon of cavalry._

German gunsmiths developed the wheellock in the sixteenth century. A wheellock gun could be kept loaded in a holster for as long as needed and fired at once, so horsemen took it up, but it was delicate and expensive and stayed a weapon of an elite. Flint mechanisms were known by the middle of the same century. The form that spread across Europe is traditionally credited to the Le Bourgeoys family of gunsmiths at Lisieux in Normandy: a gun they made for King Louis XIII, now in the Metropolitan Museum of Art in New York, is one of the earliest flintlocks to survive.

![The butt and lock of a French flintlock gun, the walnut stock carved with a scroll and inlaid with mother-of-pearl and silver wire, the cock holding its flint above the steel](https://lastcodex.org/_astro/v3.BaNLQhJl_2aJ6j.webp)
_The flintlock made for Louis XIII by the Le Bourgeoys workshop is as much a work of decoration as of mechanics._

In the last years of the seventeenth century, the flintlock musket replaced the matchlock in European armies, and for about a century and a half it was the standard infantry weapon. The United States Army's Model 1840 was its last flintlock musket. Its successor of 1842 used the percussion lock, which went back to the experiments of a Scottish minister, Alexander John Forsyth. He worked on compounds that explode when struck and patented a lock using them in 1807. Copper caps later made the system simple, and many flintlocks were converted to take them.

Breech-loaders had been tried for centuries, but they leaked gas and flame and were hard to make in quantity. Johann Nikolaus Dreyse, a gunsmith at Sömmerda in Thuringia, worked on needle ignition from the late 1820s and turned his gun into a breech-loader with a sliding bolt in the 1830s. Prussia took it up for its army in the early 1840s. In the war of 1866 against Austria, Prussian infantry could fire it fast and reload it lying down, although historians now doubt that it alone decided the war. Bolt-action rifles fed from a magazine followed in most armies.

Gunsmiths were already making repeating guns in the seventeenth century. In 1884 Hiram Maxim, an American inventor living in London, patented the first truly automatic weapon, which used the recoil of each shot to load and fire the next. Machine guns of this kind dominated the battlefields of the First World War. Self-loading rifles, submachine guns and assault rifles later brought the same principle to weapons carried by a single soldier.

## Key facts

- Oldest surviving guns: Chinese bronze hand guns of the late 13th century
- Matchlock: Europe, 15th century
- Flintlock musket in military service: From the last years of the 17th century to the 1840s
- Percussion lock patented: Alexander Forsyth, 1807
- First truly automatic gun: Hiram Maxim, patented 1884

## Requires

- [Gunpowder](https://lastcodex.org/en/inventions/gunpowder/): The explosive behind guns and mining (c. 850)
- [Bronze](https://lastcodex.org/en/inventions/bronze/): Copper and tin, harder together (c. 3,300 BCE)
- [Iron Smelting](https://lastcodex.org/en/inventions/iron-smelting/): Wider adoption around 1200 BCE; ore, charcoal and a bloomery (c. 1,200 BCE)
- [Steel](https://lastcodex.org/en/inventions/steel/): Iron with just enough carbon (c. 1,000 BCE)

## Leads to

- [Tank](https://lastcodex.org/en/inventions/tank/): An armoured fighting vehicle on tracks (1915)

## Sources

- [Small arm (Edward C. Ezell)](https://www.britannica.com/technology/small-arm), Encyclopaedia Britannica
- [Military technology: the first small arms, the matchlock, the wheel lock and the flintlock (John F. Guilmartin)](https://www.britannica.com/technology/military-technology/Early-use-of-artillery), Encyclopaedia Britannica
- [Machine gun](https://www.britannica.com/technology/machine-gun), Encyclopaedia Britannica
- [Early ignition systems](https://centerofthewest.org/?p=34593), Cody Firearms Museum, Buffalo Bill Center of the West
- [Flintlock gun of Louis XIII, King of France, Pierre and Marin Le Bourgeois, Lisieux, c. 1620 (1972.223)](https://www.metmuseum.org/art/collection/search/24865), The Metropolitan Museum of Art
- [Pair of Forsyth patent third model sliding primer pistols, c. 1828 (label on the 1807 percussion lock)](https://www.metmuseum.org/art/collection/search/33340), The Metropolitan Museum of Art
- [Alexander John Forsyth](https://www.britannica.com/biography/Alexander-John-Forsyth), Encyclopaedia Britannica
- [Dreyse, Nikolaus von (Neue Deutsche Biographie and Allgemeine Deutsche Biographie)](https://www.deutsche-biographie.de/gnd102461643.html), Deutsche Biographie, Historische Kommission bei der Bayerischen Akademie der Wissenschaften
- [Die Schlacht bei Königgrätz 1866](https://www.dhm.de/lemo/rueckblick/die-schlacht-bei-koeniggraetz-1866.html), LeMO, Deutsches Historisches Museum
- [British Maxim machine gun, converted Mk 2 (FIR 9397)](https://www.iwm.org.uk/collections/item/object/30034916), Imperial War Museums
- [Weapons of the ancient world: fire lances and cannons](https://archaeology.org/issues/may-june-2020/collection/fire-lances-cannons/weapons-of-the-ancient-world/), Archaeology magazine, Archaeological Institute of America
- [The Engines of Our Ingenuity, no. 242: early guns](https://engines.egr.uh.edu/episode/242), John H. Lienhard, University of Houston
- [Christ Church MS 92: Walter of Milemete, De nobilitatibus, sapientiis et prudentiis regum (1326–1327)](https://www.chch.ox.ac.uk/sites/default/files/2023-09/MS-92.pdf), Christ Church, Oxford (manuscript catalogue)
- [T. Andrade, Late Medieval Divergences: Comparative Perspectives on Early Gunpowder Warfare in Europe and China, Journal of Medieval Military History XIII (2015): the Heilongjiang gun dated to 1288 and the Xanadu gun of 1298](https://www.tonioandrade.com/_files/ugd/88be10_6d1a981ca79946488ba646c3630d550a.pdf), Boydell & Brewer (author's copy)
- [Springfield Model 1842 percussion musket (AF.20400)](https://www.si.edu/object/nmah_414388), National Museum of American History, Smithsonian Institution
- [Snaphaunce revolving gun, German, ca. 1660-70 (accession 1972, bequest of William G. Renwick)](https://www.metmuseum.org/art/collection/search/27325), The Metropolitan Museum of Art
- [D. Michael (Curator, Cody Firearms Museum), Volitional rifles, the origins of the Winchester lever action, American Society of Arms Collectors Bulletin 127 (2023) 99-108: repeating rifles of 1680 and 1683](https://americansocietyofarmscollectors.org/wp-content/uploads/2024/03/Volitional-rifles-origin-of-the-Winchester-lever-action-Michael-v127.pdf), American Society of Arms Collectors
- [Firearms Examiner Training, module 3: Cartridge cases (paper cartridges; the case as gas seal)](https://nij.ojp.gov/nij-hosted-online-training-courses/firearms-examiner-training/module-03/cartridge-cases), National Institute of Justice, U.S. Department of Justice
- [D. S. Thomas, Federal Ammunition for Civil War Breechloading Carbines and Rifles: gas leakage at the breech overcome by advances in cartridge making](https://americansocietyofarmscollectors.org/wp-content/uploads/2022/04/1998-B78-Federal-Ammunition-for-Civil-War-Breechl.pdf), American Society of Arms Collectors, Bulletin 78 (1998)

Fact-checked on 2026-10-22.

---

The Last Codex · https://lastcodex.org/en/inventions/firearms/ · © The Last Codex. Texts, plates and figures: CC BY-NC-ND 4.0.
