Uyghur Khaganate

Uyghur Khaganate
The Uyghur Khaganate at its greatest extent
Capital Ordu Baliq
Languages Old Uyghur language
Religion Tengrism, Manicheism, Buddhism
Government Monarchy
Uyghur Khagans
   744–747 Qutlugh Bilge Köl
  841–847 Öge Khan
   Established 744
   Disestablished 840[1]
   800[2][3] 3,100,000 km² (1,196,917 sq mi)
Preceded by
Succeeded by
Turkic Khaganate
Kara-Khanid Khanate
Gansu Uyghur Kingdom
Kingdom of Qocho
Today part of  Mongolia
History of the Turkic peoples
Pre-14th century
Turkic Khaganate 552–744
  Western Turkic
  Eastern Turkic
Khazar Khaganate 618–1048
Xueyantuo 628–646
Great Bulgaria 632–668
  Danube Bulgaria
  Volga Bulgaria
Kangar union 659–750
Turgesh Khaganate 699–766
Uyghur Khaganate 744–840
Karluk Yabgu State 756–940
Kara-Khanid Khanate 840–1212
  Western Kara-Khanid
  Eastern Kara-Khanid
Gansu Uyghur Kingdom 848–1036
Kingdom of Qocho 856–1335
Pecheneg Khanates
Kimek Khanate
Oghuz Yabgu State
Ghaznavid Empire 963–1186
Seljuk Empire 1037–1194
  Seljuk Sultanate of Rum
Kerait khanate 11th century–13th century
Khwarazmian Empire 1077–1231
Naiman Khanate –1204
Qarlughid Kingdom 1224–1266
Delhi Sultanate 1206–1526
  Mamluk dynasty
  Khilji dynasty
  Tughlaq dynasty
Golden Horde | [4][5][6] 1240s–1502
Mamluk Sultanate (Cairo) 1250–1517
  Bahri dynasty
  Ottoman Empire 1299-1923

The Uyghur Khaganate (or Uyghur Empire or Uighur Khaganate or Toquz Oghuz Country) (Modern Uyghurئورخۇن ئۇيغۇر خانلىقى), (Tang era names, with modern Hanyu Pinyin: traditional Chinese: 回鶻; simplified Chinese: 回鹘; pinyin: Huíhú or traditional Chinese: 回紇; simplified Chinese: 回纥; pinyin: Huíhé) was a Turkic empire[7] that existed for about a century between the mid 8th and 9th centuries. They were a tribal confederation under the Orkhon Uyghur (回鶻) nobility, referred to by the Chinese as the Jiu Xing ("Nine Clans"), a calque of the name Toquz Oghuz or Toquz Tughluq.[8]

The rise of Uyghurs in Mongolia

In the Gobi, the Tang dynasty was supported by the Uighurs after the Uighurs left the control of the Western Turks due to the defeat by the Western Turks by Tang Taizong.[9] In 627-628 a revolt of the Uighurs against the Turkic Khaganate weakened the Turks and the Turkic Uighurs fought against the Tibetans and Turks in alliance with the Chinese.[10]

In 742, the Old Uyghurs, Karluks, and Basmyls rebelled against the ruling Göktürks.[11] The Basmyls captured the Göktürk capital, Otukan, and the Göktürk king, Özmish Khan, in 744, effectively taking charge of the region. However, a Uyghur-Karluk alliance against the Basmyls was formed later the same year. The coalition defeated the Basmyls and beheaded their king. The Basmyl tribes were effectively destroyed; their people sold to the Chinese or distributed amongst the victors. The Uyghur leader became the khagan in Mongolia and the Karluk leader the yabgu.

This arrangement, however, lasted less than a year, as hostilities between the Uyghurs and Karluks forced the Karluks to migrate westward into the western Turgesh lands.[12]

The Uyghur leader was from the Yaghlakar clan (Old Turkic language: , Jaγlaqar, Chinese: 藥羅葛; pinyin: Yàoluógé), called Qullığ Boyla and known in Chinese sources as Guli Peiluo (Chinese: 骨力裴羅). He took the title Qutlugh Bilge Köl Kaghan "Glorious, wise, mighty kaghan", claiming to be the supreme ruler of all the tribes and built his capital at Ordu-Baliq. According to Chinese sources, the territory of the Uyghur Empire then reached "on its eastern extremity, the territory of Shiwei, on the west the Altai Mountains, on the south it controlled the Gobi Desert, so it covered the entire territory of the ancient Xiongnu".[13]

In 747, the Qutlugh Bilge Köl Kaghan died, leaving his youngest son, Bayanchur Khan to reign as Khagan El etmish bilge "State settled, wise". After building a number of trading outposts with the Han Chinese, Bayanchur Khan used the profits to build the capital, Ordu-Baliq, and another city, Bai Baliq, further up the Selenga River. The new khagan then embarked on a series of campaigns to bring all the steppe peoples under his banner. During this time the Empire vastly expanded, with Sekiz Oghuz, Qïrghïz, Qarluqs, Türgish, Toquz Tatars, Chiks and the remnants of the Basmïls coming under Uyghur rule.

The rebellion of An Lushan in Tang China in 755 forced Emperor Suzong to turn to Bayanchur Khan for assistance in 756. The khagan agreed, ordered his eldest son to provide military service to the Tang emperor, and helped to quell several rebellions, as well as to defeat an invading army from the Tibetan Empire from the south and to take from rebels together with Tang forces both capitals, western Chang'an and eastern Luoyang. As a result, in 757 the Uyghurs received 20,000 rolls of silk as tribute from the Chinese. Bayanchur Khan was given the daughter of the Chinese Emperor to marry (princess Ninguo), while Emperor Suzong was given a Uyghur princess.

In 758, the Uyghurs turned their attentions to a rival steppe tribe to the north, the Yenisei Kirghiz. Bayanchur Khan destroyed several of their trading outposts before slaughtering a Kyrgyz army and executing their Khan. In 759, Bayanchur Khan died after drinking heavily at a celebration. His son, Tengri Bögü, succeeded him as Khagan Qutlugh Tarkhan sengün.

At Tingzhou the Uighurs and Chinese were defeated by the Tibetans which led to the Gansu corridor being taken away from Tang rule in 791.[14]

Professor James A. Millward described the original Uyghurs as phenotypically East Asian in appearance, before they began to mix with the Caucasoid inhabitants of the Tarim Basin. Millward gives as an example the images of the "Uyghur patrons" at temple 9 in the Bezeklik caves.[15]

Golden Age

During the reign of Tengri Bögü the Uyghur Khaganate reached the height of its power.[11] In 762, with the help of Tengri Bögü, the Tang Emperor Daizong finally quelled the An Lushan rebellion (then under the leadership of Shi Chaoyi), and the eastern capital Luoyang was recaptured. A Treaty of Peace and Alliance was concluded with the Tang, which had the obligation to pay 40 rolls of silk to the Uyghur Empire in exchange for every horse brought by the Uyghurs; also, Uyghurs living in Tang China were all considered as "guests" and freed from payment of any taxes and accommodation costs.

Khagan Tengri Bögü met with Manichaean priests from Iran while on campaign and was converted to Manichaeism, adopting it as the official religion of the Uyghur Empire in 762.[16] One effect of this conversion was the increased influence of Sogdia in the Uyghur court. In 779 Tengri Bögü, incited by his Sogdian advisers, planned an invasion of China to take advantage of the accession of a new emperor, Dezong. However, Tengri Bögü's uncle, Tun Bagha Tarkhan, opposed this plan: "Tun Bagha became annoyed and attacked and killed him and, at the same time, massacred nearly two thousand people from among the kaghan's family, his clique and the Sogdians.[17] The rebellion was supposedly sponsored by the Tang Ambassador to the Uyghur Empire. Tun Bagha Tarkhan ascended the throne with the title Alp Qutlugh Bilge ("Victorious, glorious, wise") and enforced a new set of laws, which he designed to secure the unity of the khaganate. He also moved against the Yenisei Kirghiz again, finally bringing them under the control of the Khaganate.

Relationship with the Sogdians

In order to control trade along the Silk Road, the Uyghurs established a trading relationship with the Sogdian merchants who controlled the oases of Turkestan. As described above, the Uyghur adoption of Manichaeism was one aspect of this relationship—choosing Manichaeism over Buddhism may have been motivated by a desire to show independence from Tang influence.[18] It must be noted that not all Uyghurs supported conversion—an inscription at Karabalghasun states that Manichaens tried to divert people from their ancient shamanistic beliefs.[19] A rather partisan account from a Uyghur-Manichaen text of that period demonstrates the unbridled enthusiasm of the khaghan for Manichaeism:

At that time when the divine Bogu Khan had thus spoken, we the Elects of all the people living within the land rejoiced. It is impossible to describe this ourjoy. The people told the story to one another and rejoiced. At that time, groups of thousands and tens of thousands assembled and with pastimes of all sorts they entertained themselves even unto dawn. And at the break of the day they made a short fast. The divine ruler Bogu Khan and all the elects of his retinue mounted on horses, and all the princes and the princesses led by those of high repute, the big and the small, the whole people, amidst great rejoicing proceeded to the gate of the city. And when the divine ruler had entered the city, he put the crown on his head... and sat upon the golden throne.
Uyghur-Manichaen text.[19]

As conversion was based on political and economic concerns regarding trade with the Sogdians, it was driven by the rulers and often encountered resistance in lower societal strata. Furthermore, as the khaghan's political power depended on his ability to provide economically for his subjects, "alliance with the Sogdians through adopting their religion was an important way of securing this objective."[18] Both the Sogdians and the Uyghurs benefited enormously from this alliance. The Sogdians enabled the Uyghurs to trade in the Western Regions and exchange silk from China for other goods. For the Sogdians it provided their Chinese trading communities with Uyghur protection. The 5th and 6th centuries saw a large emigration of Sogdians to China. The Sogdians were main traders along the Silk Roads, and China was always their biggest market. Among the paper clothing found in the Astana cemetery near Turfan is a list of taxes paid on caravan trade in the Gaochang kingdom in the 620s. The text is incomplete, but out of the 35 commercial operations it lists, 29 involve a Sogdian trader.[20] Ultimately both rulers of nomadic origin and sedentary states recognized the importance of merchants like the Sogdians and made alliances to further their own agendas in controlling the Silk Roads.


Ordu-Baliq, capital of the Uyghur Khaganate (745-840) in Mongolia.

The Uyghurs created an empire with clear Persian influences, particularly in areas of government.[21] Soon after the empire was founded, they emulated sedentary states by establishing a permanent, settled capital, Karabalghasun (Ordu-Baliq), built on the site of the former Göktürk imperial capital, northeast of the later Mongol capital, Karakorum. The city was a fully fortified commercial center, typical along the Silk Road, with concentric walls and lookout towers, stables, military and commercial stores, and administrative buildings. Certain areas of the town were allotted for trade and handcrafts, while in the center of the town were palaces and temples, including a monastery. The palace had fortified walls and two main gates, as well as moats filled with water and watchtowers.

The khaghan maintained his court there and decided the policies of the empire. With no fixed settlement, the Xiongnu had been limited in their acquisition of Chinese goods to what they could carry. As stated by Thomas Barfield, "the more goods a nomadic society acquired the less mobility it had, hence, at some point, one was more vulnerable trying to protect a rich treasure house by moving it than by fortifying it."[21] By building a fixed city, the Uyghurs created a protected storage space for trade goods from China. They could hold a stable, fixed court, receive traders, and effectively cement their central role in Silk Road exchange.[21] However, the vulnerability that came with having a fixed city was to be the downfall of the Uyghurs.[18]

Decline and collapse

After the death of Tun Bagha Tarkha in 789, the power of the Uyghur Empire declined, and the empire started to fragment. The Tibetans took the area of Beshbalik, and the Karluks captured Fu-tu valley, which brought considerable fear to the Uyghur people.[22] In 795, the khagan bearing the title Qutlugh Bilge died, and the Yaghlakar dynasty came to an end. A general named Qutlugh declared himself the new khagan, under the title Tängridä ülüg bulmïsh alp kutlugh ulugh bilgä kaghan ("Greatly born in moon heaven, victorious, glorious, great and wise Kaghan"),[11] founding a new dynasty, the Ediz (Chinese: A-tieh). With solid leadership once more, the Khaganate averted collapse. Qutlugh became renowned for his leadership and management of the empire. Although he consolidated the empire, he failed to restore its previous power. On his death in 808, the empire began to fragment once again. He was succeeded by his son, who went on to improve trade in inner Asia. The name of the last great khagan of the Empire is unknown, though he bore the title Kün tengride ülüg bulmïsh alp küchlüg bilge ("Greatly born in sun heaven, victorious, strong and wise"). His achievements included improved trade up with the region of Sogdia, and on the battlefield he repulsed a force of invading Tibetans in 821. This khagan died in 824 and was succeeded by a brother, Qasar, who was murdered in 832, inaugurating a period of anarchy. In 839 the legitimate khagan was forced to commit suicide, and a usurping minister named Kürebir seized the throne with the help of 20,000 invited horsemen of Shatuo from Ordos. In the same year there was a famine and an epidemic, with a particularly severe winter that killed much of the livestock the Uyghur economy was based on.[23]

The following spring, in 840, one of nine Uyghur ministers, Kulug Bagha, rival of Kurebir, fled to the Yenisei Kirghiz and invited them to invade from the north. With a force of around 80,000 horsemen, they sacked the Uyghur capital at Ordu-Baliq, razing it to the ground.[1] The Kyrgyz captured the Uyghur Khagan, Kürebir (Hesa), and promptly beheaded him. They went on to destroy other cities throughout the Uyghur empire, burning them to the ground. 10,000 Uighurs were killed when on February 13, 843 at Kill the Foreigners Mountain (Shahu) Shi Xiong led the Chinese Tang army in achieving victory over the Uighurs.[24][25] The last legitimate khagan, Öge, was assassinated in 847, having spent his six-year reign fighting the Kyrgyz, the supporters of his rival Ormïzt, a brother of Kürebir, and Tang China boundary troops in Ordos and Shaanxi, which he invaded in 841. The Kyrgyz invasion destroyed the Uyghur Empire, causing a diaspora of Uyghurs across Central Asia.[1][26]


Uyghur king from Turfan region attended by servants. Mogao cave 409, 11th-13th century.

After the fall of the empire, two kingdoms, the Gansu Uyghur Kingdom (848–1036) in Gansu[27] and the Kingdom of Qocho (856–1369) near Turfan, were formed by the Uyghurs who fled (southwest and west respectively) from the Yenisei Kirgiz. The Uyghurs in Qocho converted to Buddhism, and, according to Mahmud al-Kashgari, were "the strongest of the infidels" while the Gansu Uyghur Kingdom fell to the Tangut people in the 1030s.[28] In 1209, The Qocho ruler Baurchuk Art Tekin declared his allegiance to Genghis Khan, and the Uyghurs became important civil servants in the later Mongol Empire, which adapted the Old Uyghur alphabet as its official script. According to the New Book of Tang, a third group went to seek refuge amongst the Karluks.[29] The Karluks, together with other tribes such as the Chigils and Yagmas, later founded the Kara-Khanid Khanate (940–1212). Some historians associate the Karakhanids with the Uyghurs as the Yaghmas were linked to the Toquz Oghuz. Sultan Satuq Bughra Khan, believed to be a Yagma from Artux, converted to Islam in 932 and seized control of Kashgar in 940, giving rise to the new Dynasty, known as Karakhanids.[30]

List of Uyghur Khagans

The following list is based on Denis Sinor, "The Uighur Empire of Mongolia," Studies in Medieval Inner Asia, Variorum, 1997, V: 1-25. Because of the complex and inconsistent Uyghur and Chinese titulatures, references to the rulers now typically include their number in the sequence, something further complicated by the non-inclusion of an unnamed ephemeral son of 4 between 5 and 6 in 790, and the inclusion of a spurious reign between 7 and 9.

  1. 744–747 Qutlugh bilge köl (K'u-li p'ei-lo)
  2. 747–759 El-etmish bilge (Bayan Chur, Mo yen ch'o), son of 1
  3. 759–779 Qutlugh tarqan sengün (Tengri Bögü, Teng-li Mou-yü), son of 2
  4. 779–789 Alp qutlugh bilge (Tun bagha tarkhan), son of 1
  5. 789–790 Ai tengride bulmïsh külüg bilge (To-lo-ssu), son of 4
  6. 790–795 Qutlugh bilge (A-ch'o), son of 5
  7. 795–808 Ai tengride ülüg bulmïsh alp qutlugh ulugh bilge (Qutlugh, Ku-tu-lu)
  8. 805–808 Ai tengride qut bulmïsh külüg bilge (spurious reign: tenure belongs to 7, name to 9)
  9. 808–821 Ai tengride qut bulmïsh külüg bilge (Pao-i), son of 7
  10. 821–824 Kün tengride ülüg bulmïsh alp küchlüg bilge (Ch'ung-te), son of 9
  11. 824–832 Ai tengride qut bulmïsh alp bilge (Qasar, Ko-sa), son of 9
  12. 832–839 Ai tengride qut bulmïsh alp külüg bilge (Hu), son of 10
  13. 839–840 Kürebir (Ho-sa), usurper
  14. 841–847 Öge, son of 9
  1. 744–747 Kutlug Bilge Köl Kagan
  2. 747–759 Bayan Çor
  3. 759–779 Bögü Kagan
  4. 779–789 Tun Baga Tarkan
  5. 789–790 Ay Tengride Kut Bulmış Külük Bilge Kagan
  6. 790–795 Kutluk Bilge Kagan
  7. 795–808 Ay Tengride Ülüg Bulmış Alp Ulug Kutlug Bilge Kagan
  8. 805–808 Ay Tengride Kut Bulmış Alp Külük Bilge Kagan
  9. 808–821 Ay Tengride Kut Bulmış Alp Bilge Kagan
  10. 821–824 Kün Tengride Ülüg Bulmış Alp Küçlüg Bilge Kagan
  11. 824–832 Alp Bilge Hasar Tigin Tengri Kagan
  12. 832–839 Alp Külüg Bilge Kagan
  13. 841–847 Üge Kagan

Images of Buddhist and Manichean Uyghurs

Images of Buddhist and Manichean Uyghurs from the Bezeklik caves and Mogao grottoes.

Uyghur Khagan 
Uyghur king from Turfan, from the murals at the Dunhuang Mogao Caves. 
Uyghur prince from the Bezeklik murals. 
Uyghur woman from the Bezeklik murals. 
Uyghur Princess. 
Uyghur Princesses from the Bezeklik murals. 
Uyghur Princes from the Bezeklik murals. 
Uyghur donors. 
Uyghur Prince from the Bezeklik murals. 
Uyghur noble from the Bezeklik murals. 
Uyghur noble from the Bezeklik murals. 
Uyghur donor from the Bezeklik murals. 
Uyghur Manichaean Electae from Qocho. 
Uyghur Manichaean clergymen from Qocho. 
Art from Qocho. 
Manicheans from Qocho 

See also


  1. 1 2 3 4 "History of Central Asia". Encyclopedia Britannica. Retrieved 8 November 2016.
  2. Turchin, Peter; Adams, Jonathan M.; Hall, Thomas D (December 2006). "East-West Orientation of Historical Empires". Journal of world-systems research. 12 (2): 222. ISSN 1076-156X. Retrieved 16 September 2016.
  3. Rein Taagepera (September 1997). "Expansion and Contraction Patterns of Large Polities: Context for Russia". International Studies Quarterly. 41 (3): 493. doi:10.1111/0020-8833.00053. Retrieved 16 September 2016.
  4. Marshall Cavendish Corporation (2006). Peoples of Western Asia. p. 364.
  5. Bosworth, Clifford Edmund (2007). Historic Cities of the Islamic World. p. 280.
  6. Borrero, Mauricio (2009). Russia: A Reference Guide from the Renaissance to the Present. p. 162.
  7. China's last Nomads: the history and culture of China's Kazaks Linda Benson, Ingvar Svanberg Edition illustrated, M.E. Sharpe, 1998, ISBN 1-56324-782-8, ISBN 978-1-56324-782-8. p.16-19
  8. Bughra, Imin (1983). The history of East Turkestan. First publication Kabul, Second proper publication Istanbul: Istanbul publications. pp. 50–51.
  9. Kenneth Scott Latourette (1964). The Chinese, their history and culture. Macmillan. p. 144.
  10. Haywood, John; Jotischky, Andrew; McGlynn, Sean (1998). Historical Atlas of the Medieval World, AD 600-1492. Barnes & Noble. p. 3.20. ISBN 978-0-7607-1976-3.
  11. 1 2 3 MacKerras, Colin (1990), "Chapter 12 - The Uighurs", in Sinor, Denis, The Cambridge History of Early Inner Asia, Cambridge University Press, pp. 317–342, ISBN 0 521 24304 1
  12. Golden, Peter. B. (1990), "Chapter 13 - The Karakhanids and Early Islam", in Sinor, Denis, The Cambridge History of Early Inner Asia, Cambridge University Press, p. 349, ISBN 0 521 24304 1
  13. Xin Tangshu 新唐書 New Book of Tang, chapter 217 part 1 - Original text: 東極室韋,西金山,南控大漠,盡得古匈奴地。
  14. Haywood, John; Jotischky, Andrew; McGlynn, Sean (1998). Historical Atlas of the Medieval World, AD 600-1492. Barnes & Noble. p. 3.20. ISBN 978-0-7607-1976-3.
  15. Millward, James A. (2007). Eurasian Crossroads: A History of Xinjiang (illustrated ed.). Columbia University Press. p. 43. ISBN 0231139241. Retrieved 10 March 2014.
  16. Manichaeism and Nestorian Christianity, H. J. Klimkeit, History of Civilizations of Central Asia, Vol.4, Part 2, ed. Clifford Edmund Bosworth, M.S.Asimov, (Motilal Banarsidass, 2003), 70.
  17. M. S. Asimov (March 1999). History of Central Asia - The historical,social and economic setting. Volume 4 part I. Motilal Banarsidass Publ. p. 194. ISBN 978-81-208-1595-7. Retrieved 30 December 2011.
  18. 1 2 3 Sinor, D. (1990). Cambridge History of Early Inner Asia. Cambridge.
  19. 1 2 Roemer (editor), Prof. R (1984). The Uighur Empire of Mongolia (chapter 5) in Guo ji zhongguo bian jiang xue shu hui yi lun wen chu gao. Taibei.
  20. de la Vaissière, Étienne. "Sogdians in China: a short history and some new discoveries".
  21. 1 2 3 Barfield, Thomas (1992). The Perilous Frontier: Nomadic Empires and China, 221 BC to AD 1757. Wiley.
  22. Jiu Tangshu 舊唐書 Old Book of Tang, chapter 195 - Original text: 葛祿乘勝取回紇之浮圖川,回紇震恐,悉遷西北部落羊馬於牙帳之南以避之。 Translation The Karluks took the opportunity to win control of Uyghur's Fu-tu valley; the Uyghurs, shaken with fear, moved their north-western tribes, with sheep and horses, to the south of the capital to escape. (In Xin Tangshu, Fu-tu valley (浮圖川) was referred to as Shen-tu Valley 深圖川)
  23. Tangshu 新唐書 New Book of Tang, chapter 217 part 2 - Original text: 方歲饑,遂疫,又大雪,羊、馬多死
  24. Michael Robert Drompp (2005). Tang China And The Collapse Of The Uighur Empire: A Documentary History. BRILL. pp. 114–. ISBN 90-04-14129-4.
  25. John W. Dardess (10 September 2010). Governing China: 150-1850. Hackett Publishing. pp. 32–. ISBN 978-1-60384-447-5.
  26. Manichaeism and Nestorian Christianity, H. J. Klimkeit, History of Civilizations of Central Asia, Vol.4, Part 2, 70.
  27. Peter B. Golden, Central Asia in World History, (Oxford University Press, 2011), 47.
  28. James A. Millward, Eurasian Crossroads: A History of Xinjiang, (Columbia University Press, 2007), 50.
  29. Xin Tangshu Original text: 俄而渠長句錄莫賀與黠戛斯合騎十萬攻回鶻城,殺可汗,誅掘羅勿,焚其牙,諸部潰其相馺職與厖特勒十五部奔葛邏祿,殘眾入吐蕃、安西。 Translation: Soon the great chief Julumohe and the Kirghiz gathered a hundred thousand riders to attack the Uyghur city; they killed the Kaghan, executed Jueluowu, and burnt the royal camp. All the tribes were scattered—its ministers Sazhi and Pang Tele with fifteen clans fled to the Karluks, the remaining multitude went to Turfan and Anxi.
  30. Golden, Peter. B. (1990), "The Karakhanids and Early Islam", in Sinor, Denis, The Cambridge History of Early Inner Asia, Cambridge University Press, pp. 355–357, ISBN 0 521 24304 1

Further reading

This article is issued from Wikipedia - version of the 11/8/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.