The Mogao Caves, also known as the Thousand Buddha Grottoes, form a system of 492 temples 25 km southeast of the center of Dunhuang, an oasis strategically located at a religious and cultural crossroads on the Silk Road, in Gansu province, China. The caves may also be known as the Dunhuang Caves, however, this term is also used as a collective term to include other Buddhist cave sites in the Dunhuang area, such as the Western Thousand Buddha Caves, and the Yulin Caves farther away. The caves contain some of the finest examples of Buddhist art spanning a period of 1,000 years. The first caves were dug out in 366 as places of Buddhist meditation and worship. The Mogao Caves are the best known of the Chinese Buddhist grottoes and, along with Longmen Grottoes and Yungang Grottoes, are one of the three famous ancient Buddhist sculptural sites of China.
An important cache of documents was discovered in 1900 in the so-called "Library Cave," which had been walled-up in the 11th century. The content of the library was dispersed around the world, and the largest collections are now found in Beijing, London, Paris and Berlin, and the International Dunhuang Project exists to coordinate and collect scholarly work on the Dunhuang manuscripts and other material. The caves themselves are now a popular tourist destination, with a number open for visiting.
Dunhuang was established as a frontier garrison outpost by the Han Dynasty Emperor Wudi to protect against the Xiongnu in 111 BC. It also became an important gateway to the West, a centre of commerce along the Silk Road, as well as a meeting place of various people and religions such as Buddhism.
The construction of the Mogao Caves near Dunhuang is generally taken to have begun sometime in the fourth century . According to a book written during the reign of Tang Empress Wu, Fokan Ji by Li Junxiu, a Buddhist monk named Le Zun had a vision of a thousand Buddhas bathed in golden light at the site in 366, inspiring him to build a cave here. The story is also found in other sources, such as in inscriptions on a stele in cave 332, an earlier date of 353 however was given in another document, Shazhou Tujing. He was later joined by a second monk Faliang, and the site gradually grew, by the time of the Northern Liang a small community of monks had formed at the site. Members of the ruling family of Northern Wei and Northern Zhou constructed many caves here, and it flourished in the short-lived Sui Dynasty. By the Tang Dynasty, the number of caves had reached over a thousand.
The caves initially served only as a place of meditation for hermit monks, but developed to serve the monasteries that sprang up nearby in the early periods, and by the Sui and Tang dynasties, Mogao Caves had become a place of worship and pilgrimage for the public. From the 4th until the 14th century, caves were constructed by monks to serve as shrines with funds from donors. These caves were elaborately painted, the cave paintings and architecture serving as aids to meditation, as visual representations of the quest for enlightenment, as mnemonic devices, and as teaching tools to inform those illiterate about Buddhist beliefs and stories. The major caves were sponsored by patrons such as important clergy, local ruling elite, foreign dignitaries, as well as Chinese emperors. Other caves may have been funded by merchants, military officers, and other local people such as women's groups.
During the Tang Dynasty, Dunhuang became the main hub of commerce of the Silk Road and a major religious centre. A large number of the caves were constructed at Mogao during this era, including the two large statues of Buddha at the site, the largest one constructed in 695 following an edict a year earlier by Tang Empress Wu Zetian to build giant statues across the country. The site escaped the persecution of Buddhists ordered by Emperor Wuzong in 845 as it was then under Tibetan control. As a frontier town, Dunhuang had been occupied at various times by other non-Han Chinese people. After the Tang Dynasty, the site went into a gradual decline, and construction of new caves ceased entirely after the Yuan Dynasty. By then Islam had conquered much of Central Asia, and the Silk Road declined in importance when trading via sea-routes began to dominate Chinese trade with the outside world. During the Ming Dynasty, the Silk Road was finally officially abandoned, and Dunhuang slowly became depopulated and largely forgotten by the outside world. Most of the Mogao caves were abandoned; the site, however, was still a place of pilgrimage and was used as a place of worship by local people at the beginning of the twentieth century when there was renewed interest in the site.