Gunpowder is a mixture of saltpeter (potassium nitrate), sulfur, and charcoal, historically used as a propellant in firearms and cannons. Its invention is attributed to Chinese alchemists during the Tang dynasty (9th century AD). The precise date of its discovery is uncertain, but by the 10th century, gunpowder was widely used in China for military and fireworks purposes. Gunpowder eventually spread to Europe via the Silk Road and became instrumental in transforming warfare, leading to the widespread use of firearms and the decline of traditional melee weapons such as swords and spears. Its impact on military technology and tactics was profound, shaping the course of world history. However, gunpowder's use in firearms has also been associated with significant social and political consequences, including changes in warfare strategies, the rise of nation states.
References: - https://en.wikipedia.org/wiki/Gunpowder