The fire lance was a proto-gun developed in the 10th century with a tube of first bamboo and later on metal that shot a weak gunpowder blast of flame and shrapnel; its earliest representation comes from a painting found at Dunhuang.
The earliest fire lances were spear-like weapons combining a tube containing gunpowder and projectiles tied to a Chinese spear. Upon firing, the charge ejected a small projectile or poison dart along with the flame. These fire lances had a range of only a few feet. Being a weapon that combines with a spear, it was initially used as a hand-to-hand weapon with the gunpowder shot designed to give the wielder an edge in close-quarter combat.
Inventors soon saw the merit in the gunpowder/tube design and fire lances then appeared independent of the spear.
The first fire-lances were seen in China during the 10th century, but by about 1260 they had developed into a variety of forms and although normally associated with peasant rebels, regular Song troops also used them, their use by cavalry being described at the siege of Yangzhou in 1276. They were cheap and popular for several centuries sometimes being used in racks to defend cities and remained in use until well after the Ming period. The development of gunpowder in the fire lance to have enough force to hurl a killing projectile was a key step along the development of the first true guns.
This weapon paved the way for further improvements to gunpowder weapons and is the direct ancestor of the modern-day firearm and artillery.