The origin of gunpowder is unknown and may have occurred in China, Turkey, or Europe. The first record describing the combination of charcoal, sulfur, and saltpetre, to produce a rapidly burning or exploding powder is coded writing by Franciscan monk Roger Bacon shortly before 1250 A.D.
Within 50 years, the early cannon had been developed. A large thick metal tube with one closed end (the breech) and an open-end (the muzzle) was loaded first with gunpowder and then with a projectile. The powder was ignited with a torch or smouldering ember through a small hole in the rear (the touchhole). The rapidly expanding gases from the exploding gunpowder would throw the projectile from the barrel. This basic principle still applies today.
It took another half-century for this concept to be applied to individual hand-held weapons. The first firearms, ca. 1350, called "hand cannons" or "handgonnes," were essentially miniature cannons designed to be held by hand or attached to a pole for use by individual soldiers. They were loaded and fired in the same manner as the full-size cannons.