The Matchlock was the first mechanism or "lock" invented to uncomplicate the firing of a hand-held firearm. This design removed the need to lower a lit match into the flash pan by hand and made it possible to have both hands free to keep a firm grip on the weapon at the moment of firing, and more importantly to keep both eyes on the target.
The classic Europe an matchlock gun held a burning slow match in a clamp at the end of a small curved lever known as the serpentine. Upon pulling a second lever (or in later models a trigger) protruding from the bottom of the gun and connected to the serpentine, the clamp dropped down, lowering the burning match into the flash pan and igniting the priming powder. The flash from the primer travelled through the touch hole igniting the main charge of propellant in the gun barrel. On releasing the lever or trigger, the serpentine would move in reverse, driven by a spring, and bring the match out of the pan.
Earlier types had only an "S"-shaped serpentine pinned to the stock either behind or in front of the flash pan (the so-called "serpentine lock"), one end of which was manipulated to bring the match into the pan.
A variety of matchlock was also developed called the snapping matchlock, in which the serpentine was strongly spring-loaded, and released by pressing a button, pulling a trigger, or pulling a short string passing into the mechanism. As the match was often extinguished after its relatively violent collision with the flash pan, this type fell out of favour with soldiers, but was often used in fine target weapons.
An inherent weakness of the matchlock was the necessity of keeping the match constantly lit. Being the sole source of ignition for the powder, if the match was not lit when the gun needed to be fired, the mechanism was useless, and the weapon became little more than an expensive club. This was chiefly a problem in wet weather, when damp match cord was difficult to light and to keep burning. Another drawback was the burning match itself. At night, the match would glow in the darkness, potentially giving away the carrier's position. The distinctive smell of burning match-cord was also a give away of a musketeer's position (this was used as a plot device by Akira Kurosawa in his movie Seven Samurai). It was also quite dangerous when soldiers were carelessly handling large quantities of gunpowder (for example, while refilling their powder horns) with lit matches present. This was one reason why soldiers in charge of transporting and guarding ammunition were amongst the first to be issued self-igniting guns like the wheellock and snaphance.
The matchlock firearms were first mentioned in the 14th century Chinese military book Huolongjing. The famous Janissary corps of the Ottoman army were soon using matchlock muskets as early as the 1440s. The matchlock appeared in Europe some time in the mid-1400s, although the idea of the serpentine appears some 40 years previously in an Austrian manuscript. The first dated illustration of a matchlock mechanism dates to 1475, and by the 1500s they were universally used. The technology was transported to India by Babur in 1526 and to Japan by the Portuguese in 1543 and flourished there until the 1900s. The Japanese Matchlock, or Tanegashima was based on an unknown model of Portuguese snapping matchlock, but was refined so that the difficulties with self-extinguishing matches were almost eliminated (Japanese technology however was unable to produce steel springs until much later, unreliable brass springs being used at first). Improvised matchlock guns were last used by pro-Indonesia Timor Leste militias in the 1999 conflict.
Despite the appearance of more advanced ignition systems, such as that of the wheellock and the snaphance, the low cost of production, simplicity, and high availability of the matchlock kept it in use in European armies until about 1720. It was eventually completely replaced by the flintlock as the foot soldier's main armament.