At the heart of the ancient Silk Road, on the edge of the Gobi Desert, lies a centuries-old place of pilgrimage: hundreds of caves hewn from a sandstone cliff containing some of the most exquisite Buddhist frescoes and figures in the world.
Abandoned for centuries, the Mogao Grottoes somehow survived everything that nature and man could throw at them, including earthquakes, floods and sandstorms. Marauding Muslim rebels, plundering European explorers and White Russian soldiers all left their mark. Rampaging Red Guards were turned away at the height of China's Cultural Revolution.
Today, the caves outside Dunhuang, in western China, enjoy a new stature, at the heart of Communist China's efforts to revitalise and rebuild the Silk Road as a testament to its growing power in Asia. They also stand as a symbol of Sino-American cooperation in China's cultural preservation, thanks to pioneering work by the Getty Conservation Institute.
But the fragile wall paintings, some of which date to the 4th century and show stories from Buddha's life and visions of the afterlife, face another threat - from a new army of tourists and the lure of profit.
"In the past 100 years, most of the damage has been done by nature, but visits by more tourists will break the original balance inside the caves," said Wang Xudong, president of Dunhuang Academy, which runs, preserves and restores the site.
"Constant entrance and exit changes the temperature and humidity inside the caves. Human bodies also carry microorganisms, and if they start to grow inside the caves, it would be very scary."
More than 1.1 million tourists visited the caves in 2015, a rise of 40 per cent in just a year and a roughly 20-fold jump in the past two decades.
The vast majority are Chinese, as the country's growing wealth fuels a huge boom in domestic tourism and as interest is renewed in China's Buddhist past.
With advice from Getty's experts, the Dunhuang Academy initially tried to cap the number of tourists at 3000 a day but later realised "that limit just would not stop people from coming," Wang said. The limit was then raised to 6000 a day, but demand regularly exceeds that in the peak July-to-October season.
To relieve the pressure, tourists are asked to register in advance and, before visiting the site, watch two 20-minute movies in a sweeping new visitors' centre on the history of Dunhuang and the caves themselves.
Later, they are guided through a selection of the 40 caves that are open to the public, forbidden to take photographs in case their camera flash damages the frescoes.
Register too late, above the 6000 cutoff, and you'll miss the movies and get to see only four caves. By giving these latecomers "a very bad experience," Wang said he hopes to encourage more people to come during the low season, when ticket prices are halved.
The question is whether Wang can stem the tide. Beside the visitors' centre, 14km from the caves, construction workers are building a privately funded tourist complex, including a theater and hotels.
In the city of Dunhuang, a US$250 million conference center and a bigger, 2000-seat theater are being built to house an annual Silk Road Cultural Expo. The large modern airport is being expanded, with a US$150 million upgrade.
"There is enormous commercial pressure," said Neville Agnew, who has been visiting and working in the caves for 28 years for the Getty Conservation Institute. "The growth of the city of Dunhuang depends ultimately on the Mogao Grottoes. They are going to have their work cut out to control visitation, and, of course, I think you'd find many people who are interested in development of the region want more visitors."
Yet there is also state-of-the-art restoration work going on here, thanks to a long-standing collaboration between the Dunhuang Academy, Getty and other foreign experts.
Painstakingly, the restorers start in each cave by taking hundreds of high-resolution photographs, in colour and black-and-white. Then the frescoes are examined to see what materials were used - and the causes of deterioration diagnosed - before experts decide on the best materials and methods to restore them.
Some of the paintings, rendered on a base of mud and grass, are partly detached from the rock face, and enormously vulnerable to humidity or earthquakes. Different kinds of grout were extensively tested before one was chosen to fill the gaps.
The project has produced guidelines that have been applied to other grottoes across China as well as principles that have helped the country better manage its heritage sites. It has also spawned a major new exhibition at the Getty Research Institute in Los Angeles that runs from May until September and includes full-size replicas of three of the caves.
It is a much happier example of Sino-Western collaboration than the caves experienced a century ago. In 1907, Hungarian British archaeologist Aurel Stein persuaded a local monk to sell him 24 trunks packed with ancient Buddhist scriptures and five trunks of paintings, embroideries and other artworks that had only recently been discovered in a small walled-up cave. He paid the equivalent of £130.
French, Japanese and Russian explorers took thousands more priceless documents in subsequent years before American Langdon Warner showed up in 1923 to find the portable treasures gone. Determined not to leave empty-handed, he took some of the sculptures and used adhesive glue to rip a dozen paintings off the walls.
The official history calls them the "despicable treasure hunters".
Others who weren't seeking relics inflicted their own sorts of damage. In 1870, Muslim rebels turned up at the caves, burning down many of the wooden ladders that gave access. They may also have been responsible for scratching off the faces from some of the paintings.
In 1921, White Russian soldiers who had retreated into China during the war against the Bolsheviks were detained by the Chinese Government and temporarily jailed in the caves. The damage from their fires, and their graffiti, is still visible in several caves.
But history was kinder during China's Cultural Revolution, when, on orders from Premier Zhou Enlai, People's Liberation Army soldiers and police were dispatched to protect the caves from gangs of Red Guards intent on destroying them.
Today, 735 caves remain, hewn from the cliff over a period of 1000 years. Nearly 500 have paintings on the walls - undecorated caves were for meditation - while more than 2000 sculptures have survived.
With partners all over the world, the Dunhuang Academy is working on a major digital archiving project, photographing the caves and everything that was once contained within them. Wang said that more than 40,000 artworks or scriptures are scattered around the world but that this is a way to unite them and preserve them forever.
"Of course, we hope that when the world truly becomes a big family, they can come back to Mogao caves and unite with the other relics here," he said. "But reality is quite cruel sometimes. If we can get them back to the Internet family through digitalisation, that is a target we can achieve for now."