On the edge of the Gobi Desert in China, part of a network of cave shrines at Dunhuang called the Thousand Buddha Grottoes, it was sealed for almost 1000 years. In 1900, Taoist monk Wang Yuanlu – an unofficial guardian of the caves – discovered the hidden door that led to a chamber filled with manuscripts dating from the fourth to the 11th Centuries.

Provincial authorities showed little interest in the documents after Wang contacted them; but news of the cave spread, and Hungarian-born explorer Aurel Stein persuaded him to sell about 10,000 manuscripts. Delegations from France, Russia and Japan followed, and most of the ancient texts left the cave. According to The New Yorker, “By 1910, when the Chinese government ordered the remaining documents to be transferred to Beijing, only about a fifth of the original hoard remained.”

Despite that, many of the original manuscripts can now be seen: an initiative to digitise the collection was launched in 1994. The International Dunhuang Project – led by the British Library, with partners worldwide – means that, as The New Yorker says, “Armchair archive-divers can now examine the earliest complete star chart in the world, read a prayer written in Hebrew by a merchant on his way from Babylon to China, inspect a painting of a Christian saint in the guise of a bodhisattva, examine a contract drawn up for the sale of a slave girl to cover a silk trader’s debt, or page through a book on divination written in Turkic runes.”

No one knows why the cave was sealed: Stein argued that it was a way of storing manuscripts no longer used but too important to be thrown away, a kind of ‘sacred waste’, while French sinologist Paul Pelliot believed it happened in 1035, when the Xi Xia empire invaded Dunhuang. Chinese scholar Rong Xinjiang has suggested that the cave was closed off amid fears of an invasion by Islamic Karakhanids, which never occurred.

Whatever the reason they were originally hidden, the cave’s contents have altered history since they were revealed just over a century ago. One of the Dunhuang documents, the Diamond Sutra, is a key Buddhist sacred work: according to the British Library, the copy in the cave dates back to 868 and is “the world's earliest complete survival of a dated printed book”.

It’s a reminder that paper and printing did not originate in Europe. “Printing began as a form of prayer,” says The New Yorker, “the equivalent of turning a prayer wheel or slipping a note into the Western Wall in Jerusalem, but on an industrial scale.”

A wing and a prayer