region claimed by various states throughout history, and its historic capital, Qocho, about 325 km to the west. During the Later Han dynasty, Hami repeatedly changed hands between the Chinese and Xiongnu who both wanted to control this fertile and strategic oasis. Several times the Han set up military agricultural colonies to feed their troops and supply trade caravans. It was especially noted for its melons, raisins and wine. "The region of Yiwu [Hami] is favourable for the five types of grain [rice, two kinds of millet, wheat and beans], mulberry trees, hemp, and grapes. Further north is Liuzhong [Lukchun]. All these places are fertile. This is why the Han have constantly struggled with the Xiongnu over Jushi [Turfan/Jimasa] and Yiwu [Hamich], for the control of the Western Regions." The decline of the Xiongnu and the Han dynasty led to relative stability and peace for Hami and the surrounding area. However, in 456, the Northern Wei dynasty occupied the Hami region. Based here, they launched raids against the Rouran Khagante. After the decline of the Northern Wei dynasty around the 6th century, the First Turkic Khaganate assumed control of the region. Hami was then tossed around between the western and eastern branches of the khaganate. Xuanzang visited the oasis town, famous for its melons, the first of a string of oases supplied by the Tian Shan Mountains. This water had been preserved in underground wells and channels since time immemorial. The town had long been inhabited by a Chinese military colony. During the early Tang dynasty and reaching into the Sui dynasty, the Chinese colony had accepted Turkic rule. Xuanzang stayed at a monastery inhabited at the time by three Chinese monks. The Tang dynasty asserted control over the region and occupied Hami in the 7th century. The Tibetan Empire and the Tang vied for control of the region until the Chinese were repelled in 851. After the collapse of the Uyghur empire, a group of Uyghurs migrated to the Hami region and ushered in an era of linguistic and cultural change of the local population. The Mongols conquered this region during the Yuan dynasty. Later Gunashiri, a descendant of Chagatai Khan, founded his own small state called Qara Del in Kumul or Hami, which accepted Ming supremacy in the early 15th century, but was conquered by another branch of Mongols later on. The Ming dynasty established this region as