Historiography of gunpowder and gun transmission

In the history of gunpowder there are a range of theories about the transmission of the knowledge of gunpowder and guns from China to the rest of the world. 
Theories of non-Chinese invention.
Although the oldest extant guns appear in the Yuan dynasty, the historian Tonio Andrade notes that there is a surprising scarcity of reliable evidence of guns in Iran or Central Asia prior to the late 14th century. He argues that, in the Middle East, no guns are mentioned prior to the 1360s, while Russian records do not contain reliable mentions of firearms until 1382, after the gun's arrival in western Europe, despite their closer proximity and interactions with the Mongol empires.
European origin.
Although there is some evidence that points to the possible appearance of guns in Andalusia as early as the 1330s, Thomas T. Allsen says that "in the Latin West the first uncontestable evidence of firearms is from 1326, surprisingly somewhat earlier than in the lands that lie between China ... and western Europe. This has caused some doubt among historians on the gun transmission theory, and even whether or not there was a transmission at all. One dissident opinion comes from Stephen Morillo, Jeremy Black, and Paul Lococo's "War in World History" which argues that "the sources are not entirely clear about Chinese use of gunpowder in guns. There are references to bamboo and iron cannons, or perhaps proto-cannons, but these seem to have been small, unreliable, handheld weapons in this period. The Chinese do seem to have invented guns independently of the Europeans, at least in principle; but, in terms of effective cannon, the edge goes to Europe."
There was a stream of thought in Europe that emerged in the early 15th century that attributed the invention of both gunpowder and the gun to a certain Berthold Schwartz (Niger Berchtoldus or "Black Berthold"). By the turn of the 16th century, the story of Black Berthold was being repeated by numerous writers. In 1605, William Camden declared:
It's not exactly certain who Berthold was or if he ever existed as there are no contemporary records of him. Some consider him a mythical figure, used as a stand-in "for all the curious and ingenious experiments related to the new and dangerous mixture of saltpetre, sulfur (brimstone) and carbon." According to Henry Pratap Phillips, Berthold Schwartz was actually named Constantin Anchlitzen, and made gunpowder at Freiburg around the year 1330. J.R. Partington believes Schwartz is a purely legendary figure invented for the purpose of providing a German origin for gunpowder and cannon. The dating of Schwartz' invention of gunpowder, given by the Jesuit Athanasius Kircher as 1354, is also later than even the first usage of cannons in Europe. The chronological problem did not go unnoticed and in 1732, Hermann Boerhaave shifted the invention of gunpowder to Roger Bacon while Schwartz was relegated to the role of discovering its explosive military properties. In 1753, Peter Shaw dismissed Schwartz by pointing to European usage of cannons as early as 1338. The idea of Berthold Schwartz as the inventor of gunpowder had already begun to decline in the 17th century. Two years after writing about Schwartz' invention of gunpowder, Kircher changed his mind and said that the "invention of gunpowder, which is not possible to deny took place long before our times in China." In 1678, the commander Louis de Gaya downgraded Schwartz' status as an inventor to a mere transmitter. According to de Gaya, Schwartz obtained gunpowder, invented in China, from Tartars during his travels in Muscovy around 1380. The idea that gunpowder was a Chinese invention was not new to Europeans by then, and had been in circulation in Europe since at least the late 16th century. According to Juan de Mendoza, writing in 1585, the Chinese told the Portuguese that they had invented gunpowder, contradicting their own belief that "an Almane" had been the inventor. By the 18th century, missionary writers with access to Chinese records were convinced that gunpowder and firearms had been invented in China, though belief in a European origin never died entirely. A well known monograph on the history of artillery by Colonel Henry Hime, published in 1915, attributed the discovery of gunpowder to Roger Bacon and claimed gunpowder was brought to China from the West.
Scholars suggest that the lack of gunpowder weapons in a well-traveled Venetian's catalogue for a new crusade in 1321 implies that guns were unknown in Europe up until this point, while the earliest Latin and Arabic descriptions of purifying saltpeter, a key ingredient in gunpowder, do not appear until the 1200s, seven centuries after the Chinese. Others have tried to extrapolate ancient mentions of producing thunder as proof of gunpowder, but invariably run into problems with dating, anachronisms, and interpolations, leading modern arms historians to conclude that true gunpowder was unknown in Europe before the 13th century.
Islamic origin.
There is an independent invention theory supporting an Islamic origin of the gun, citing the Mamluk deployment of hand cannons in 1260 and a passage by Ibn Khaldun on the Marinid Siege of Sijilmassa in 1274: "[ The Sultan] installed siege engines … and gunpowder engines …, which project small balls of iron. These balls are ejected from a chamber … placed in front of a kindling fire of gunpowder; this happens by a strange property which attributes all actions to the power of the Creator." The passage, dated to 1382, and its interpretation has been rejected as anachronistic by most historians, who urge caution regarding claims of Islamic firearms use in the 1204–1324 period as late medieval Arabic texts used the same word for gunpowder, naft, as they did for an earlier incendiary, naphtha. Needham believes Ibn Khaldun was speaking of fire lances rather than hand cannon.
Historian Ahmad Y. al-Hassan, based on his analysis of 14th-century Arabic manuscripts which he argues to be copies of earlier texts, claims that hand cannons were used at the Battle of Ain Jalut in 1260. However Hassan's claims have been refuted by other historians such as David Ayalon, Iqtidar Alam Khan, Joseph Needham, Tonio Andrade, and Gabor Ágoston. Khan argues that it was the Mongols who introduced gunpowder to the Islamic world, and believes cannons only reached Mamluk Egypt in the 1370s. According to Needham, the term "midfa", dated to textual sources from 1342 to 1352, did not refer to true hand-guns or bombards, and contemporary accounts of a metal-barrel cannon in the Islamic world do not occur until 1365. Similarly, Andrade dates the textual appearance of cannon in middle eastern sources to the 1360s. Gabor Ágoston and David Ayalon believe the Mamluks had certainly used siege cannon by the 1360s, but earlier uses of cannon in the Islamic World are vague with a possible appearance in the Emirate of Granada by the 1320s, however evidence is inconclusive.
Indian origin.
The idea that ancient Hindus had knowledge of gunpowder traces back to two 18th century authors: N.B. Halhed and Q. Craufurd. Halhed's Persian translation of a Sanskrit digest of laws, "Code of Gentoo Laws" (1776), translates "agni-astra" as "firearms" or "fire-arrow discharged from bamboo," and "sataghni", which literally means "hundred-killer" as "cannon." Craufurd's text published in 1790 thought the old Hindus used gunpowder but was doubtful of their use before Europeans. In 1848, Professor Wilson, Director of the Asiatic Society at Calcutta, wrote that Indians were well acquainted with gunpowder and that rockets were an Indian inventioin. According to H.M. Elliot's "The History of India as Told by its own Historians" (1875), saltpetre may have possibly been used in explosives mentioned in the "Ramayana" and "Sri Bhagavat". 
In 1880, Gustav Oppert claimed that the oldest documents describing gunpowder were the Sanskrit texts "Sukraniti" and "Nitiprakasika". The "Sukraniti" contains descriptions of firearms and a formula for "agni-curna" (fire-powder) or 'suvarcilavana' (well-shining salt) very similar to that mentioned the "Wujing Zongyao": 5 parts saltpetre, 1 part sulphur, and 1 part charcoal. The two firearms mentioned in the "Sukraniti" are a musket and a cart-drawn gun. There are no definite dates for these works despite claims of their antiquity. Oppert uses archaeological evidence from the ancient temple carvings in India, where soldiers are depicted carrying or in some cases firing the firearms, as proof of ancient use of fireams. Most of these temples are not older than 500 years except Tirupallani temple. However he claims the use of firearms in "Sukraniti" as authentic and the use of firearms and gunpowder in India since the ancient Vedic period (1500–500 BC).
The ingredients listed in "Sukraniti" as constituents for gunpowder such as realgar, opiment, lac, camphor, indigo, pine gum, megnetic oxide of iron, vermillion, graphite are used in the manufacture of incendiary weapons in "Arthashastra" and also appear in Chinese accounts. 
The "Arthashastra" lists recipes for explosive and inflammable powder called 'agnisamyogas' or 'agniyoga' which J.R. Partington notes are very similar to gunpowder recipes quoted in Chinese, Arabic and European texts. However they do not contain saltpetre. A. Kalyanamaran argues that sulphur was not needed to create gunpowder and nitre could be obtained from fermented dung mentioned in the ingredients. The Greek historian Philostratos cites a letter written by Alexander saying that the reason why the Greek army refrained from advancing from Hydaspis to Ganges was because of the frightful dangers it encountered when people of Oxydraces threw flaming thunderbolts from the top of their forts. H. Wilkinson, who also believes Greek Fire was first discovered by the Indians, considers this as the earliest evidence of gunpowder in the world. According to J. Backman, gunpowder was invented in India and brought to Europe by Muslims. A device in the "Arthashastra" called ulka is used as a shower of firebrand which makes a thunder sound (or noise of drumming) in the sky which according to the "Arthashastra" is used by astrologists to show it to the enemy subjects on the day of their birth star. Authors such as A 7th century Chinese text mentions that people in northwest India were familiar with saltpetre and used it to produce purple flames. 
"Nitisara", variously dated between 4th century BC – 6th century CE, is a treatise by a Buddhist scholar named Kamandaka mentions gunfiring (nalikadibhdi) and states that the bodyguards of the king should rouse him with gun-firing if he indulges in girls, drinks, bouts etc. The gun firing was probably shotless military pyrotechnic using tubular weapons (although Oppert states that another word 'Nadika" is also used in one of the text's version and may well mean gongs). 
Muhammad ibn Zakariya al-Razi mentions in a treaties dated 910 a material called 'Indian salt', which he describes as "black and friable, with very little glitter," which has been interpreted as saltpetre by Berthelot but this is disputed by Joseph Needham. Accoding to Firishta, Mehmud Ghaznavi (r. 999–1030) employed 1,008 cannon (top) and muskets (tufang) during his battle of Peshawar with Kabul Shahi king Annandapal. In a text called "Mujmalut Tawarikh" dated to 1126 which was translated from Arabic which itself was based on an original Sanskrit work, some type of grenade shaped like a terracotta elephant with a fuse is mentioned which was placed in the army van and when the invading army drew near, it exploded and the flames destroyed great portion of that army.
According to Henry Pratap Phillips, some content in the Sanskrit works resemble that found in the "Wujing Zongyao" and it is possible that it was borrowed from the latter. However he believes it is the opposite and the gunpowder formula in the "Wujing Zongyao" came from the "Sukraniti". Phillips and Oppert both consider "The Rajalakshminarayana Hradaya", which Oppert dates to a "very remote period," as proof of ancient Indian knowledge of gunpowder since it mentions charcoal, sulphur, and other materials in the preparation of fire. The lack of saltpetre is explained by Phillips as a conscious omission for the sake of secrecy.
J.R. Partington rejected Oppert's claims in his "A History of Greek Fire and Gunpowder". Partington believes that the "sataghni" mentioned in Sanskrit text was an iron-mace rather than a cannon while Joseph Needham is of the opinion that its translation as cannon cannot be sustained. The word for cannon, "nalika", does not appear in any Sanskrit dictionary, and the source of "Sukratini" is the mythical Usanas of Sukracharya. There is also no classical Sanskrit word for saltpetre while "shoraka" in late Sanskrit is derived from Persian. Rajendralala Mitra raised doubts about the age of another work by Usanas, "Nitisara" of Sukracharya, noting that it contains descriptions of firearms as they were a hundred years ago. In Partington's opinion the work is legendary. In 1902, P.C. Ray raised doubts about the authenticity of textual evidence supporting ancient Hindu knowledge of gunpowder. Ray pointed out that the gunpowder mixture of 4:1:1 saltpetre, charcoal, and sulphur found in "Sukraniti" was the most efficient for guns and was not known in Europe until the 16th century, leading him to believe that the content was an interpolation by "the handiwork of some charlatan." P.K. Gode provided textual evidence that pyrotechnical recipes recorded in the Sanskrit treatise, "Kautukacintamani", were copied from a Chinese source. Some scholars based on the fact that it mentions matchlock firearms date the text to the modern period. Similarly H.L. Blackmore wrote in 1965 that Oppert's theories were absurd and no proper attempt to date the sources had been made. H.W.L. Hime goes as far as to say that "early Indian gunpowder is definitely a fiction" while Partington calls it a "legend." According to Kaushik Roy, the ancient and medieval Indians used saltpetre for incendiary devices but not for gunpowder.
Arguments for and against Chinese transmission.
Historian Tonio Andrade supports the gun transmission theory, noting that while records of gunpowder weapons and their evolution into the gun exist in China, "there are no records of any such developments in Europe," and that the arrival of the gun in Europe was such that it "appears fully formed around 1326." This is not strictly true, as Kelly DeVries points out that compilers of early gunpowder recipes in Europe understood that should the instrument carrying gunpowder be enclosed on one end, the gunpowder reaction inside would produce "flying fire." Andrade goes on to analyze the nature and etymology of gunpowder in Europe and comes to the conclusion that it is intrinsically in favor of the transmission theory rather than an independent invention. There are the older and more numerous formulas of gunpowder using a variety of different proportions of key ingredients – saltpeter, sulphur, and charcoal – which he believes is proof of its evolution and experimentation in China, where gunpowder was first applied to warfare as an incendiary, then explosive, and finally as a propellant. In contrast gunpowder formulas in Europe appear both later and offer very little divergence from the already ideal proportions for the purpose of creating an explosive and propellant powder. Another facet of the gunpowder transmission theory is the appearance of gunpowder in Europe ready made for military usage, and is generally referred to as "gun"powder rather than a civilian term such as the Chinese "fire-drug," which suggests an originally non-military usage, whereas in Europe it was almost immediately and exclusively used for its military qualities. Muslim terms of saltpeter may also point toward a gunpowder transmission, if not the gun itself, as an Andalusian botanist referred to it as "Chinese snow," while in Persia it was called "Chinese salt." Perhaps even further in the Sinocentric gun transmission camp is Joseph Needham who claims that "all the long preparations and tentative experiments were made in China, and everything came to Islam and the West fully fledged, whether it was the fire-lance or the explosive bomb, the rocket or the metal-barrel hand-gun and bombard." However, theories of European, Islamic, and Indian origins for the gun and gunpowder still persist today in tandem with the transmission theory.
There are problems on both extremes of the gun transmission debate. Its proponents emphasize the older history of gunpowder evolution as attested by historical records and archaeological samples in China, its less obviously militarily focused name as "fire medicine," the Mongol role as a catalyst in disseminating gunpowder technology, and criticizes the scant or absent evidence of prior experimentation with gunpowder in Europe for non-military purposes before the arrival of the gun. However, there are still several blanks in the history of a gun transmission theory and the questions they raise which its proponents have been unable to answer. The rapid spread of guns across Eurasia, only 50 years from China to Europe, with non-existent evidence of its route from one extreme of the continent to the other, remains a mystery. Other Chinese inventions such as the compass, paper, and printing took centuries to reach Europe, with events such as the Battle of Talas as perhaps a possible takeoff point for discussion. No such event exists on record for either gunpowder or the gun. There is simply no clear route of transmission, and while the Mongols are often pointed to as the likeliest vector, Timothy May points out that "there is no concrete evidence that the Mongols used gunpowder weapons on a regular basis outside of China." According to Kate Raphael, the list of Chinese specialists recruited by Genghis Khan and Hulagu provided by the History of Yuan includes only carpenters and blacksmiths, but no gunpowder workers. A conclusion most military historians in the transmission camp have come to is that the rapid diffusion of gunpowder and the gun is probably best explained by its clear military applications.
Opponents of the transmission theory criticize the vagueness of Chinese records on the specific usage of gunpowder in weaponry, the existence of gunpowder or possibly lack thereof in incendiary weapons as described by Chinese documents, the weakness of Chinese firearms, the non-existent route of diffusion or evidence of guns between Europe and China before 1326, and emphasize the independent evolution of superior guns in Europe. This too becomes problematic as already discussed above. Notably there is an acute dearth of any significant evidence of evolution or experimentation with gunpowder or gunpowder weapons leading up to the gun in 1326, which can be found in China. Gunpowder appeared in Europe primed for military usage as an explosive and propellant, bypassing a process which took centuries of Chinese experimentation with gunpowder weaponry to reach, making a nearly instantaneous and seamless transition into gun warfare, as its name suggests. Furthermore, early European gunpowder recipes shared identical defects with Chinese recipes such as the inclusion of the poisons sal ammoniac and arsenic, which provide no benefit to gunpowder. Bert S. Hall explains this phenomenon in his "Weapons and Warfare in Renaissance Europe: Gunpowder, Technology, and Tactics" by drawing upon the gunpowder transmission theory, explaining that "gunpowder came [to Europe], not as an ancient mystery, but as a well-developed modern technology, in a manner very much like twentieth-century 'technology-transfer' projects." In a similar vein Peter Lorge supposes that the Europeans experienced gunpowder "free from preconceived notions of what could be done," in contrast to China, "where a wide range of formulas and a broad variety of weapons demonstrated the full range of possibilities and limitations of the technologies involved." There is also the vestige of Chinese influence, and not European, on Muslim terminology of some gunpowder related items such as saltpeter, which has been described as either Chinese snow or salt, fireworks which were called Chinese flowers, and rockets which were called Chinese arrows. Moreover, Europeans in particular experienced great difficulty in obtaining saltpeter, a primary ingredient of gunpowder which was relatively scarce in Europe compared to China, and had to be obtained from "distant lands or extracted at high cost from soil rich in dung and urine." Thomas Arnold believes that the similarities between early European cannons and contemporary Chinese models suggests a direct transmission of cannon making knowledge from China rather than a home grown development. Whatever the truth may be, the first unambiguous references to guns appeared in Europe in the 1320s.