Gunpowder is thought to have been discovered by accident by Chinese alchemists around 850. However, this interpretation is contested. Some evidence suggests the black powder was discovered by the Arabs. In any case, the Chinese scientists were trying to invent an elixir that would render whoever took it immortal, but instead discovered the first explosive.
The Sung dynasty in China quickly understood the power of the explosive and used it for military purposes for protection against the Mongols in the early part of the tenth century. By 1304, the Arabs had developed the first gun, and by the fourteenth century, black powder in firearms was common in Europe, as evidenced by the presence of primitive gunpowder cannons on the battlefield becoming mandatory in the French and English military.