a Muslim invasion. The Abassids defeated the Tang Chinese army at the Battle of Talas, but were later defeated by the Seljuk Turks and the Mongols centuries later, until the Arab Empire eventually came to an end after the Battle of Baghdad in 1258. In China, the Sui dynasty had risen and conquered the Chen Dynasty of the south. They invaded Vietnam (northern Vietnam had been in Chinese control since the Han dynasty), fighting the troops of Champa, who had cavalry mounted on elephants. After decades of economic turmoil and a failed invasion of Korea, the Sui collapsed and was followed by the Tang dynasty, who fought with various Turkic groups, the Tibetans of Lhasa, the Tanguts, the Khitans, and collapsed due to political fragmentation of powerful regional military governors (jiedushi). The innovative Song dynasty followed next, inventing new weapons of war that employed the use of Greek Fire and gunpowder (see section below) against enemies such as the Jurchens. The Mongols under Genghis Khan, Ögedei Khan, Möngke Khan, and Kublai Khan conquered most of Eurasia. They took over China, Persia, Turkestan, and Russia. After Kublai Khan took power and created the Yuan dynasty, the divisions of the empire ceased to cooperate with each other, and the Mongol Empire was only nominally united. In New Zealand, prior to European discovery, oral histories, legends and whakapapa include many stories of battles and wars. Māori warriors were held in high esteem. One group of Polynesians migrated to the Chatham Islands, where they developed the largely pacifist Moriori culture. Their pacifism left the Moriori unable to defend themselves when the islands were invaded by mainland Māori in the 1830s. They proceeded to massacre the Moriori and enslave the survivors. Warrior culture also developed in the isolated Hawaiian Islands. During the 1780s and 1790s the chiefs and alii were constantly fighting for power. After a series of battles the Hawaiian Islands were united for the first time under a single ruler who would become known as Kamehameha I. Gunpowder warfare After gunpowder weapons were first developed in Song dynasty China (see also Technology of Song Dynasty), the technology later spread west to the Ottoman Empire, from where it spread to the Safavid Empire of Persia and the Mughal Empire of India. The arquebus was later adopted by European armies during the Italian Wars of the early 16th century. This all brought an end to