<P> The first confirmed reference to what can be considered gunpowder in China occurred more than three hundred years later during the Tang dynasty, first in a formula contained in the Taishang Shengzu Jindan Mijue (太 上 聖祖 金 丹 秘訣) in 808, and then about half a century later in a Taoist text known as the Zhenyuan miaodao yaolüe (真 元 妙 道 要略). The first formula was a combination of six parts sulfur to six parts saltpeter to one part birthwort herb, and the Taoist text warned against an assortment of dangerous formulas, one of which corresponds with gunpowder: "Some have heated together sulfur, realgar (arsenic disulphide), and saltpeter with honey; smoke (and flames) result, so that their hands and faces have been burnt, and even the whole house burned down ." Alchemists called this discovery fire medicine ("huoyao" 火藥), and the term has continued to refer to gunpowder in China into the present day, a reminder of its heritage as a side result in the search for longevity increasing drugs . </P> <P> The earliest surviving chemical formula of gunpowder dates to 1044 in the form of the military manual Wujing Zongyao, also known in English as the Complete Essentials for the Military Classics, which contains a collection of factoids on Chinese weaponry . The Wujing Zongyao served as a repository of antiquated or fanciful weaponry, and this applied to gunpowder as well, which suggests that it had already been weaponized long before the invention of what would today be considered conventional firearms . These numerous types of gunpowder weapons styling various names such as "flying incendiary club for subjugating demons," "caltrop fire ball," "ten - thousand fire flying sand magic bomb," "big bees nest," "burning heaven fierce fire unstoppable bomb," "fire bricks" which released "flying swallows," "flying rats," "fire birds," and "fire oxen" eventually gave way and coalesced into a smaller number of dominant types, notably gunpowder arrows, bombs, and guns . This was probably because some weapons were deemed too onerous or ineffective to deploy . </P> <P> At this point the formula contained too little saltpeter (about 50%) to be explosive, but the mixture was highly flammable, and contemporary weapons reflected this in their deployment as mainly shock and incendiary weapons . One of the first, if not the first of these weapons was the fire arrow . The first possible reference to the use of fire arrows was by the Southern Wu in 904 during the siege of Yuzhang, when an officer under Yang Xingmi by the name of Zheng Fan (鄭 璠) ordered his troops to "shoot off a machine to let fire and burn the Longsha Gate," after which he and his troops dashed over the fire into the city and captured it, and he was promoted to Prime Minister Inspectorate for his efforts and the burns his body endured . A later account of this event corroborated with the report and explained that "by let fire (飛火) is meant things like firebombs and fire arrows ." Arrows carrying gunpowder was possibly the most applicable form of gunpowder weaponry at the time, as early gunpowder may have only produced an effective flame when exposed to oxygen, thus the rush of air around the arrow in flight would have provided a suitable catalyst for the reaction . </P> <P> The first fire arrows were arrows strapped with gunpowder incendiaries, but in 969 two Song generals, Yue Yifang and Feng Jisheng (馮繼升), invented a variant fire arrow which utilizing gunpowder tubes as propellant . Afterwards fire arrows started transitioning to rocket propelled weapons rather than being fired from a bow . These fire arrows were shown to the emperor in 970 when the head of a weapons manufacturing bureau sent Feng Jisheng to demonstrate the gunpowder arrow design, for which he was heavily rewarded . In 1000 a soldier by the name of Tang Fu (唐 福) also demonstrated his own designs of gunpowder arrows, gunpowder pots (a proto - bomb which spews fire), and gunpowder caltrops, for which he was richly rewarded as well . The imperial court took great interest in the progress of gunpowder developments and actively encouraged as well as disseminated military technology, for example in 1002 when a local militia man named Shi Pu (石 普) showed his own versions of fireballs and gunpowder arrows to imperial officials, they were so astounded that the emperor and court decreed that a team would be assembled to print the plans and instructions for the new designs to promulgate throughout the realm . The Song court's policy of rewarding military innovators was reported to have "brought about a great number of cases of people presenting technology and techniques" (器械 法式) according to the official History of Song . Production of gunpowder and fire arrows heavily increased in the 11th century as the court centralized the production process, constructing large gunpowder production facilities, hiring artisans, carpenters, and tanners for the military production complex in the capital of Kaifeng . One surviving source circa 1023 lists all the artisans working in Kaifeng while another notes that in 1083 the imperial court sent 100,000 gunpowder arrows to one garrison and 250,000 to another . Evidence of gunpowder in the Liao dynasty and Western Xia is much sparser than in Song, but some evidence such as the Song decree of 1073 that all subjects were henceforth forbidden from trading sulfur and saltpeter across the Liao border suggests that the Liao were aware of gunpowder developments to the south and coveted gunpowder ingredients of their own . </P>

When did the chinese first use gunpowder as a weapon