Gunpowder was invented by Chinese alchemists seeking an elixir of immortality. They began to recognize the characteristics of salpeter and sulfur, two ingredients essential for gunpowder. Between 300- 650 AD several recipes were written about inflammable mixtures. Some historians date the invention of gunpowder at 850 AD when a Taoist book warned of three specific elixir formulas as too dangerous to experiment.
Around 1040 AD Tseng Kung-Liang published a true gunpowder formula for the first time in history. However, this powder was not explosive but rather burned with a sudden combustion and was used in flame-throwers. Explosive gunpowder was definitely used in the beginning of the thirteenth century.