It's one of many threats to the major tourist draw of Dunhuang, an oasis city, on the lip of the Gobi desert: the hundreds of rock-cut Buddhist grottoes that pepper a cliff face outside town.

Known as Mogaoku -- “peerless caves” --and filled with paradisiacal frescos and hand-moulded clay sculptures of saviour-gods and saints, they are, in size and historical breadth, like nothing else in the Chinese Buddhist world.

And Mogaoku is in trouble. Thrown open to visitors in recent decades, the site has been swamped by tourists in the past few years. The caves now suffer from high levels of carbon dioxide and humidity, which are severely undermining conservation efforts. The short-term solution has been to limit the number of caves that can be visited and to admit people only on timed tours, but the deterioration continues.

Plans are under way to recast the entire Dunhuang experience in a way that will both intensify and distance it. Digital technology will give visitors a kind of total immersion encounter with the caves impossible before now, but that immersion will take place 15 miles from the site.

Set between Mongolia and Tibet, Dunhuang was a vital, cosmopolitan juncture on the Silk Road. Because of its gateway position, it was where Buddhism spilled out of India and Central Asia into China, leaving a residue of spectacular art.

The first cave at Mogaoku was carved in A.D. 366 by an itinerant monk named Yuezun who said that one night he saw flame-like lights pulsing across the cliff face and took them as a sign: Here you must stay. So he cut a hole in the sandstone wall and moved in.

The association of caves with religious devotion, ancient in India, caught on here. The earliest examples, small and plain, were used for shelter and meditation, occasionally for burials. They are hard to reach and, apart from archaeologists, few people visit them now. Probably few ever did. They were made for solitude.

Yet by the early fifth century, a cave boom was underway in the Dunhuang area, with activity concentrated at Mogaoku. Larger and larger grottoes were excavated as temples and monastic lecture halls: essentially, public spaces. Many had chapel-like niches and freestanding walk-around altars, all cut from stone. As with the Ajanta Buddhist caves in India, interiors were carved with architectural features -- beams, eaves, pitched roofs, coffered ceiling -- as if to simulate buildings.

Painting covered everything. Murals illustrating jatakas, tales from the Buddha's past lives, were popular; they're like panoramic comic-book storyboards spread across a wall. For imperially commissioned interiors, images of princeling saints and court fetes were the rule. Rock ceilings were covered with fields of decorative patterning to evoke an illusion of fabric pavilions. Any leftover space was filled with figures of tiny deities -- Mogaoku was known as the Thousand Buddha Caves -- painted directly on the plastered walls or stuck on as sculptural plaques.

Sculpture was where Dunhuang departed from the Indian model. In Indian caves figures were chiselled from the living rock. Everything was literally of a piece. Maybe because the sandstone at Mogaoku was too crumbly for fine work, the artists here used another method. They made figures from mud mixed with grass and moulded over bundled branches and reeds.

Exceptionally large figures, in need of a solid core to keep them from collapsing, were made in a different way. The body of the 75-foot-tall Buddha in the cave known as the Nine-Story Temple is carved from the rock face and plastered over. His feet are planted at the cliff base; he looks out through a window, cut near the top.

Of the 800 or so caves created here from the 5th to 14th centuries, nearly half had some form of decoration. What survives adds up to a developmental timeline of Buddhist art in China, an encyclopaedic archive of styles and ideas, of dashes forward and retreats to the past.

But of course much of it has not survived. By the 11th century Dunhuang's fortunes were in decline. Sea trade had cut into Silk Road traffic. Regional wars left the town isolated. Monks, possibly panicked by rumours of an Islamic invasion, sealed up tens of thousands of manuscript scrolls in a small cave. The invasion didn't happen, but the books, many of them already ancient, stayed hidden and forgotten, as Mogaoku itself was for centuries.

Nature went to work. Sand from the dunes swept into the grottoes. Rock facades gave way, leaving interiors exposed. When people finally reappeared, the damage only increased. In the late 19th century a wandering Taoist priest named Wang Yuanlu settled down and started a ruinous program of “conservation,” discovering the bricked-up library cave with its precious scrolls in the process. He didn't know it, but he had made of one of the most important archaeological finds of modern times.

Other people soon knew. In 1907 the British explorer Aurel Stein arrived. For a pittance he bought around 5,000 silk and paper scrolls from Wang and sent them to England. Some were paintings and banners; the bulk were religious and secular books in Chinese, Sanskrit, Tibetan, Mongolian and other regional languages, evidence of the capacious ethnic melting pot that China has always been.

Of all Stein's books the prize was a ninth-century woodblock copy of the Diamond Sutra, or the “Sutra of the Perfection of Wisdom of the Diamond that Cuts Through Illusion.” As if defying the scripture's insistence on transience as the only reality, this marvellous scroll is the earliest known dated example of a printed book, six centuries older than the Gutenberg Bible.

Inside the caves, there is darkness first, intensified because of the blazing desert sun. When the eyes adjust to the dusky light filtering in, a larger-than-life fifth century Northern Wei Buddha can be seen. He has a large broad head, soft limbs and a moony smile. Dressed in a hot-weather Indian dhoti, he looks like a giant toddler lost in a world of his own.

Further inside, a small sculptured Buddha backed by a jade-green halo meditates in a niche. A standing divinity wreathed by a garland of maiden angels wears a flower-spattered robe of Persian brocade. Calligraphic figures, blue against white, tumble across the wall like swallows in a wind. Feathered, but with human faces, riding dragon-drawn chariots, they might be immortals from Chinese mythology, though in the flickering light it is hard to tell.

Then they are gone, replaced by court musicians with banjos and flutes. Soon these are gone too. Then a drama in several scenes about bandits being blinded for their crimes and rejoicing as the Buddha restores their sight. Gone. A corps of heavenly dancers, a hundred Maya Plisetskayas in saris.

China, engulfed in a long period of political disunity and chaos, couldn't prevent the plundering. Finally in 1944 the Dunhuang Research Institute, formed by a band of young Chinese scholars, took control of the site. Now called the Dunhuang Academy, it is still here, stabilising the caves structurally, conserving their sculptures and paintings and monitoring visitor access.

The site has been brought technologically up to date. A once-bare-bones staff has grown to around 300 full-time conservators, researchers, groundskeepers and guards, supplemented since the late 1980s by training teams from the Getty Conservation Institute in Los Angeles, led by Neville Agnew. The ever-encroaching tide of sand has been slowed by a system of wind-breaking nets.

Transportation to Dunhuang has become relatively easy. A new train station has just gone up; the airport runway, once made of tar that was said to turn soft in the sun, has been reinforced. Yet from a plane window the town still has a marooned, precarious look, like a lone atoll at sea.

In 1980 the caves, or some of them, were opened to the public, although only a trickle of visitors came, most of them Japanese tourists in search of the roots of their own Buddhist tradition. Recently this pattern has radically changed. With a flourishing economy, a relaxation of the Cultural Revolution's disapproval of religion and the central government's strenuous promotion of a new nationalist pride, hundreds of thousands of tourists, 90 percent of them Chinese, are coming to Mogaoku each year, jamming into the caves.

The impact has been significant. The risk of direct contact with art is somewhat reduced by the installation of transparent screens, but the physical degradation caused by fluctuating atmospheric conditions -- humid to dry to humid again -- is acute. Although no one is saying so, it is possible that without major change, all the caves will eventually have to be closed to the public.

Plans for drastic remedial action are in place. The academy will build by 2011 a new visitor reception centre several miles from the caves, near the airport and railroad station. All Mogaoku-bound travellers will be required to go to the centre first, where they will be given an immersive introduction to the caves' history, digital tours of interiors and simulated restorations on film of damaged images. They will then be shuttled to the site itself, where they will take in the ambience of its desert-edge locale and see the insides of one or two caves before returning to where they started.

About 70 percent of the money for the visitor centre -- the equivalent of $38 million -- is coming from the Chinese government. The rest must be raised from private sources.