from 750 to 794, when they turned on their Tibetan overlords and helped the Chinese inflict a serious defeat on the Tibetans. In 747, the hold of Tibet was loosened by the campaign of general Gao Xianzhi, who tried to re-open the direct communications between Central Asia and Kashmir. By 750, the Tibetans had lost almost all of their central Asian possessions to the Chinese. However, after Gao Xianzhi's defeat by the Arabs and Qarluqs at the Battle of Talas (751) and the subsequent civil war known as the An Lushan Rebellion (755), Chinese influence decreased rapidly and Tibetan influence resumed. At its height in the 780s to 790s, the Tibetan Empire reached its highest glory when it ruled and controlled a territory stretching from modern day Afghanistan, Bangladesh, Bhutan, Burma, China, India, Nepal, Pakistan, Kazakhstan, Kyrgyzstan, Tajikistan. In 821/822CE, Tibet and China signed a peace treaty. A bilingual account of this treaty, including details of the borders between the two countries, is inscribed on a stone pillar which stands outside the Jokhang temple in Lhasa. Tibet continued as a Central Asian empire until the mid-9th century, when a civil war over succession led to the collapse of imperial Tibet. The period that followed is known traditionally as the Era of Fragmentation, when political control over Tibet became divided between regional warlords and tribes with no dominant centralized authority. An Islamic invasion from Bengal took place in 1206. Yuan dynasty The Mongol Yuan dynasty, through the Bureau of Buddhist and Tibetan Affairs, or Xuanzheng Yuan, ruled Tibet through a top-level administrative department. One of the department's purposes was to select a dpon-chen ("great administrator"), usually appointed by the lama and confirmed by the Mongol emperor in Beijing. The Sakya lama retained a degree of autonomy, acting as the political authority of the region, while the dpon-chen held administrative and military power. Mongol rule of Tibet remained separate from the main provinces of China, but the region existed under the administration of the Yuan dynasty. If the Sakya lama ever came into conflict with the dpon-chen, the dpon-chen had the authority to send Chinese troops into the region. Tibet retained nominal power over religious and regional political affairs, while the Mongols managed a structural and administrative rule over the region, reinforced by the rare military intervention. This existed as a "diarchic structure" under the Yuan emperor, with power primarily in favor