In 1900 a caretaker at a half forgotten Buddhist cave complex in the Gobi Desert chipped through a sealed wall and found a library that had not been opened for nine centuries. What happened next scattered it across the world, and what is happening now is quietly putting it back together.
In June 1900, a Daoist priest named Wang Yuanlu was supervising the clearing of sand from a cave temple at Mogao, a complex of grottoes carved into a cliff in the desert outside Dunhuang, in what is now Gansu province. Wang was an unlikely custodian: a former soldier who had washed up at the caves and appointed himself their guardian, raising small sums from pilgrims to repair statues he believed the Buddha had charged him to protect. While workmen cleared the corridor of one large cave, a crack appeared in a painted side wall. Behind it lay a small chamber, roughly three metres square, stacked floor to ceiling with bundles of manuscripts, silk paintings, banners and printed documents. The room had been sealed some time in the early eleventh century. Nobody had entered it for nearly nine hundred years.
The chamber is now known as Cave 17, or the Library Cave, and its opening is one of the great archaeological accidents of the modern age. It contained somewhere in the region of fifty thousand items dating from the fourth to the eleventh century: Buddhist sutras, government decrees, tax registers, private letters, calendars, medical prescriptions, star charts, music notation, contracts, schoolbooks and prayers, written in more than twenty languages and scripts. Among them was a printed scroll of the Diamond Sutra, five metres long and pressed from carved wooden blocks, bearing the date 11 May 868: the world's earliest complete printed book with a date attached. Taken together, the contents amounted to something almost no historian dares hope for: the unedited paperwork of a medieval world as it was actually lived, preserved by desert dryness as if in a filing cabinet.
But the Library Cave is more than an archival sensation. It is the key to a place that contradicts one of the most durable clichés about China: the idea of a civilisation complete unto itself, developed behind its walls, largely indifferent to the world beyond. Dunhuang was never behind anything. It stood at the front gate. For more than a thousand years it was the point where the Chinese world handed its goods, its religions and its paperwork to the worlds of Central Asia, India and beyond, and received theirs in return. To understand Dunhuang is to see China not as an island but as a terminus, and termini are by definition places of exchange.
The Corridor and the Oasis
Dunhuang exists because of water and war, in that order. The town sits at the western end of the Hexi Corridor, the long ribbon of oases, fed by snowmelt from the Qilian Mountains, that threads between the Tibetan Plateau to the south and the Gobi Desert to the north. For any traveller moving between the Chinese heartland and Central Asia by land, the corridor was not one route among many; it was the route. And at its far end, where the corridor opened onto the Taklamakan Desert, the road forked into a northern branch and a southern branch around that deadly sea of sand. Dunhuang stood at the fork. Every caravan heading west passed through it, and every exhausted caravan heading east treated it as the first sight of home.
The Han dynasty understood this early. In 111 BC the Emperor Wu established Dunhuang as a frontier garrison, extending the Great Wall westward and building the twin passes of Yangguan and Yumenguan, the 'Southern Gate' and the 'Jade Gate', through which all sanctioned traffic was funnelled. The town's very name carried the ambition: dun meaning grand, huang meaning blazing or prosperous. It was a military foundation, but garrisons do not stay garrisons when trade is flowing. By the early centuries of the common era Dunhuang had become what it would remain for a millennium: a cosmopolitan entrepôt where Chinese officials, Sogdian merchants, Indian monks, Tibetan soldiers and Turkic horsemen shared the same markets.
The evidence of that cosmopolitanism is astonishingly direct. In a ruined Han watchtower near the town, archaeologists found the letters now known as the Sogdian Ancient Letters, written around 313 AD by merchants of the Sogdian trading diaspora. One of them, from a merchant named Nanai-vandak, describes the political chaos engulfing China and the fate of his business partners in grim commercial detail. The letters were never delivered. They lay in the wall's rubble for sixteen centuries, an undelivered postbag from the Silk Road. Few survivals anywhere in the world convey so sharply what Dunhuang was: not an exotic outpost at the edge of China, but a working junction in a continental system.
A Thousand Years on a Cliff Face
About 25 kilometres southeast of the town, a river valley cuts through the gravel desert to a cliff of conglomerate rock at the edge of the Mingsha dunes. According to a tradition recorded in later inscriptions, it was here in 366 AD that a wandering monk named Le Zun saw a vision of golden light on the cliff face, as if a thousand Buddhas were appearing in the glow, and carved the first cave for meditation. Whether or not the vision happened, the response to it certainly did. Monks followed, then lay donors, then whole communities. For a thousand years, from the fourth century to the fourteenth, generation after generation excavated, painted and repainted the cliff, producing the complex known as the Mogao Caves, the 'Caves of the Unsurpassed Height', or more evocatively the Thousand Buddha Grottoes.
The surviving scale still startles: 735 caves along roughly 1,700 metres of cliff, containing some 45,000 square metres of wall painting and more than two thousand painted clay sculptures. UNESCO placed Mogao on its very first list of World Heritage Sites for China in 1987, citing it under all six of the cultural criteria, an honour few sites anywhere share. But the numbers matter less than the range. Because the caves were funded by everyone from empresses to caravaneers, and because Dunhuang sat on the religious highway between India and China, the art on these walls is a layered record of exchange. Early Buddha figures carry the heavy lidded features and folds of wet drapery found in Gandharan and Gupta sculpture, styles born where Greek, Persian and Indian art had already mixed. Heavenly musicians play instruments from Central Asia. A Sogdian dancer whirls on a round carpet in a Tang dynasty paradise scene. Donor portraits show local families in the dress of a dozen regimes: Chinese, Tibetan, Uyghur, Tangut, Mongol. Dunhuang changed hands repeatedly, and each new power paid for caves of its own.
That political churn is part of the story. Tibetan armies held Dunhuang for over sixty years in the eighth and ninth centuries until a local general, Zhang Yichao, expelled them in 848 and returned the region to nominal Tang allegiance. Local families then governed the corridor for generations, followed by the Tangut Western Xia and eventually the Mongols. Through all of it, the digging and painting continued. The caves were never the project of a single dynasty or a single faith expressed in a single style. They were a community's accumulating memory of itself, open to whoever ruled, whoever traded, whoever prayed. Then, around the time the maritime routes began to supersede the desert roads and the Ming dynasty withdrew its frontier eastward to Jiayuguan, the flow of donors dried up. The desert began to reclaim the cliff. And at some point in the early eleventh century, for reasons still argued over, someone sealed a small room off the corridor of Cave 16, filled with the monastery's written memory, and painted the wall over it.
The Room Behind the Wall
Why the Library Cave was sealed is one of Dunhuang's genuine unsolved questions. The leading explanations are pragmatic rather than romantic: perhaps the manuscripts were hidden as a threat approached, and the fall of Buddhist Khotan to the Karakhanids around 1006 may have sent refugees and alarm eastward; or perhaps, as the scholar Susan Whitfield has argued, the chamber was simply a reverent storehouse for sacred material too holy to destroy and too worn to use, a genizah for a Buddhist world. What is not disputed is what the sealing achieved. In the dry Gobi air, paper that would have rotted in a century anywhere wetter survived intact for nine hundred years.
The result is an archive of extraordinary democracy. Yes, there are magnificent things: the 868 Diamond Sutra, printed by a man named Wang Jie 'for universal distribution' on behalf of his parents, six centuries before Gutenberg; a star chart from the seventh century that is the earliest known manuscript atlas of the night sky from any civilisation; the Old Tibetan Annals, the earliest surviving historical document in Tibetan. But the archive's real texture comes from the mundane: a contract for the sale of a slave, a complaint about a drunken monk, a schoolboy's copybook with doodles in the margin, the written rules of a women's association for mutual aid, dated 959 and the earliest dated documents of any women's club in the world. There are texts in Chinese, Tibetan, Sanskrit, Sogdian, Khotanese, Uyghur and Tangut; a Hebrew prayer sheet carried by a Jewish trader; Christian hymns in Syriac; Manichaean confessions; a fragment on the prophet Zoroaster centuries older than any other surviving Zoroastrian scripture. The scholar Ji Xianlin once remarked that Dunhuang is the only place on earth where the four great cultural systems of China, India, Greece and Islam physically converge in one archive. The Library Cave is the proof of the claim.
The Great Dispersal
What happened after Wang Yuanlu opened that wall has been told many times, and it deserves to be told carefully, because the caricatures in both directions, the innocent monk and the foreign thieves on one side, the ignorant caretaker and the scholarly rescuers on the other, flatten a more instructive reality. Wang reported his find to local officials and received neither funds nor orders beyond an instruction to guard the site. The late Qing state, bankrupt and beset, had no machinery for a discovery like this. Wang kept the key, sold or gave away pieces to passing officials to finance his restoration schemes, and waited.
In 1907 the British archaeologist Aurel Stein, born in Hungary, arrived fresh from excavating lost cities in the Taklamakan. Stein spoke little Chinese, but he had a Chinese secretary, a genuine reverence for the pilgrim Xuanzang whose memory Wang shared, and patience. Over days of negotiation he persuaded Wang to part with a vast selection, by one scholarly account some eight thousand manuscripts and five hundred paintings, in exchange for about £130, roughly £16,000 in today's money, which Wang put towards his repairs. The following year the French sinologist Paul Pelliot reached Dunhuang. Pelliot read Chinese fluently and worked through the hoard in the cave itself by candlelight for three weeks, selecting what he judged the most valuable items, several thousand manuscripts and some two hundred paintings, for about £90. Japanese, Russian and later American visitors followed; in 1924 the Harvard curator Langdon Warner used adhesive to strip a dozen Tang dynasty murals from the cave walls themselves, an act that damaged the grottoes in a way no manuscript sale ever had.
The dispersal finally provoked a response. When Pelliot displayed some of his acquisitions to scholars in Beijing in 1909, the alarm reached the Qing court, which ordered the remaining scrolls, over eight thousand of them, transferred to the capital; what survived the journey entered the new national library. In the end only about a third of the Library Cave's contents stayed in China. The rest now lies in London, Paris, St Petersburg, Kyoto, Delhi and elsewhere, and a rueful saying took root among Chinese scholars: Dunhuang is in China, but Dunhuang studies are abroad.
It is worth being precise about the moral balance here, because it genuinely cuts both ways. The sales were legal under the lax antiquities regime of the day and Wang was a willing party, yet they were transactions of radical inequality: a destitute custodian, a collapsed state and rich foreign institutions armed with expert knowledge. Chinese memory has reasonably classed the episode with the other cultural losses of the 'century of humiliation'. At the same time, the manuscripts in London and Paris were conserved, catalogued and published with a speed and care that Republican China, collapsing into warlordism, could not have matched; much of what would surely have been dispersed, burned or sold piecemeal instead entered public collections. Both things are true, and any honest account has to hold them together.
The Daughter of Dunhuang
The modern history of Mogao is the story of China building the machinery that did not exist in 1900. In 1944 the National Dunhuang Art Research Institute was established at the caves under the painter Chang Shuhong, a man who had discovered Dunhuang's art in a Paris bookstall and given up a career in France to guard it. Its small staff worked for decades in conditions of real hardship, clearing sand and copying murals by hand. In 1963 an archaeology graduate from Peking University named Fan Jinshi, aged twenty five, arrived from Shanghai for what was supposed to be a temporary posting. She stayed for more than fifty years, becoming director of the Dunhuang Academy in 1998 and earning the nickname the Daughter of Dunhuang. Her life's work has been a single, hard question: how do you save paintings that are, by their nature, disappearing?
Fan's answer was systematic rather than heroic. She fought off a plan in the late 1990s to package the grottoes into a listed tourism company, warning that there is only one Mogao. She pushed through provincial regulations protecting the site, installed doors, planted windbreaks, and set up environmental monitoring of the caves. With the Getty Conservation Institute, which has worked at Mogao since the late 1980s, her team turned the site into a laboratory of conservation science; in one Tang dynasty cave, conservators spent eight years developing a grout to reattach detached mural plaster. And she confronted the site's most corrosive modern problem: breath. Visitor numbers had grown from 26,000 when the caves opened to tourists in 1979 to over half a million by 2006, and the carbon dioxide and humidity of packed tour groups measurably threatened the pigment.
The solution, completed in 2014, is a visitor centre shaped like a dune, kilometres from the cliff, where every visitor first watches films in high definition about the caves before boarding a shuttle to see a small, rotating selection of the real ones, guided and timed. Daily numbers are capped at six thousand. Sensors inside the caves track temperature, humidity and CO2, and any cave that breaches its threshold is closed until it recovers. It is tourism redesigned around the needs of the object rather than the crowd, a model now studied at heritage sites worldwide.
The Library Reassembled
Fan's second answer to the problem of disappearance was digitisation, and here the Dunhuang story bends back on itself in the most satisfying way. The academy's Digital Dunhuang project, launched in 1999, has systematically photographed the caves and murals at high resolution; by the end of 2023 it had completed digital capture of the murals in 295 grottoes and scanned some 50,000 archival negatives. Since 2016, anyone with an internet connection has been able to walk virtually through thirty of the finest caves in high definition, free. A mural that will fade whatever anyone does now has a permanent surrogate.
Meanwhile the scattered contents of the Library Cave are being reunited, not physically but in the one medium that makes physical location irrelevant. The International Dunhuang Programme, founded at the British Library in 1994, links more than 35 institutions worldwide, including the National Library of China and the Dunhuang Academy itself, in a common effort to conserve, catalogue and digitise the dispersed manuscripts and publish them freely online. As of the start of 2026 its database held over 154,000 catalogue entries, more than 114,000 of them digitised. A scholar in Lanzhou can now place a Stein fragment in London beside its matching piece in Paris without leaving her desk. The British Library, which put the Diamond Sutra itself on extended display in 2014 and made it the centrepiece of its 2024 exhibition on Dunhuang life, has digitised the whole scroll panel by panel. The library that was broken up in a decade is being reassembled, patiently, in public.
None of this erases the history of the dispersal, and digitisation is not repatriation; the debate over where the manuscripts belong will continue, as it should. But something real has changed. The asymmetry that defined 1907, in which those with knowledge and resources carried away what those on the spot could not protect, has inverted. China is now the place doing much of the most advanced conservation science on Silk Road heritage, and the foreign collections are, increasingly, the junior partners in keeping the archive open to all.
What the Desert Remembers
Return to Wang Yuanlu in 1900, holding his lamp up to that cracked wall. He thought he had found treasure, and he sold it as treasure, bundle by bundle, to mend his crumbling statues. He was wrong about what he had found, and the mistake is the most interesting thing about him. The Library Cave was not treasure. It was memory: the complete, uncurated memory of a community that lived at the meeting point of worlds, kept not because anyone chose to preserve it but because a desert and a painted wall conspired to keep it safe.
That is what Dunhuang finally offers to anyone trying to understand China. The image of a civilisation sealed behind walls, speaking only to itself, survives nowhere on this cliff. What survives instead is a thousand years of open gates: Greek folds on Indian Buddhas painted for Chinese donors, Sogdian letters and Hebrew prayers in a Chinese monastery's storeroom, a printed book older than any in Europe produced by a Chinese craftsman for the merit of his parents. China's deepest cultural confidence has never come from isolation. It has come from the capacity, visible on every wall at Mogao, to absorb the world and make it Chinese without ceasing to face outward.
The caves are still there, still fading on their long clock, still capped at six thousand visitors a day. But the library is open again: all of it, everywhere, at once, on any screen. Wang Yuanlu's sealed room has become, nine centuries later, what its contents always deserved to be: a public memory of the fact that China was part of a wider world long before anyone thought to call it globalisation.
—
Source notes
- UNESCO World Heritage Centre: Mogao Caves listing (1987, ref. 440) and periodic reporting: 735 caves, 45,000 m² of murals, 2,290 painted statues, fourth to fourteenth centuries. Mogao Caves – UNESCO listing, Periodic report, Section II
- The British Library / International Dunhuang Programme: the Diamond Sutra (Or.8210/P.2), dated 11 May 868, 'the world's earliest dated printed book'; the Dunhuang star chart; the Sogdian Ancient Letters; the 959 rules of a women's association; IDP history (founded 1994) and database scale. IDP homepage, Buddhist texts: the Diamond Sutra, A Silk Road Oasis exhibition highlights, British Library press release on the 2024 exhibition
- Encyclopaedia Iranica, 'International Dunhuang Project': IDP founding partners and digitisation history. International Dunhuang Project
- Politeja (Jagiellonian University), 'Chinese Heritage with European Characteristics': figures for the Stein (£130) and Pelliot (£90) acquisitions and the Qing transfer of the remaining scrolls to Beijing. Article PDF
- Journal of the Royal Asiatic Society (Cambridge), 'Wang Yuanlu, the first "curator" of the Stein collection's Dunhuang corpus' (2025): Wang's discovery of Cave 17 in June 1900 and his agency in the dispersal. Journal issue, October 2025
- National Geographic, 'Caves of Faith': Getty Conservation Institute partnership, Cave 85 conservation, visitor growth past half a million by 2006. Caves of Faith
- Peking University / Xinhua profiles of Fan Jinshi: her 1963 arrival, directorship, Digital Dunhuang (launched 1999, online 2016), and digital capture of 295 grottoes by end 2023. Peking University: Fan Jinshi, the daughter of Dunhuang, China Pictorial profile
- Springer, Agnew, Demas & Fan, 'Strategies for Sustainable Tourism at the Mogao Grottoes': research into visitor capacity; the 2014 visitor centre and the daily cap of 6,000. Book page

