lost control over the Tarim Basin, which was reconquered by the Xiongnu in 63 CE and used as a base to invade the Hexi Corridor. Dou Gu defeated the Xiongnu again at the Battle of Yiwulu in 73 CE, evicting them from Turpan and chasing them as far as Lake Barkol before establishing a garrison at Hami. After the new Protector General of the Western Regions Chen Mu was killed in 75 CE by allies of the Xiongnu in Karasahr and Kucha, the garrison at Hami was withdrawn. At the Battle of the Altai Mountains in 89 CE, Dou Xian defeated the Northern Chanyu, who retreated into the Altai Mountains. The Han forces, allied with the subjugated Southern Xiongnu, again defeated the Northern Chanyu twice in 90 CE and 91 CE, forcing him to flee west into Wusun and Kangju territories. Tang dynasty The Tang dynasty fought the Tibetan Empire for control of areas in Inner and Central Asia. There was a long string of conflicts with Tibet over territories in the Tarim Basin between 670 and 692 . In 763 the Tibetans even captured the Tang capital of Chang'an for fifteen days during the An Lushan Rebellion. It was during this rebellion that the Tang withdrew its western garrisons stationed in what is now Gansu and Qinghai, which the Tibetans then occupied along with the area that is modern Xinjiang. Hostilities between the Tang and Tibet continued until they signed a formal peace treaty in 821. The terms of this treaty, including fixed borders between the two countries, are recorded in a bilingual inscription on a stone pillar outside the Jokhang in Lhasa. Western Xia dynasty The Western Xia dynasty was established in the 11th century by the Tangut people. Western Xia controlled from 1038 CE up to 1227 CE the areas in what are now the northwestern Chinese provinces of Gansu, Shaanxi, and Ningxia. Yuan dynasty Genghis Khan began the conquest of the Jin dynasty around 1207 and Ögedei Khan continued it after his death in 1227. The Jurchen-led Jin dynasty fell in 1234 CE with help from the Han-ruled Southern Song dynasty. Ögedei also conquered the Western Xia dynasty in 1227, pacifying the Hexi Corridor region, which was later absorbed into the Yuan dynasty. Geography and climate The Hexi Corridor is a long, narrow passage stretching for some from the steep Wushaolin hillside near the modern city