A technician restores one of the Mogao caves in northwest China. The 492 caves near Dunhuang acted as a depository for Buddhist art for around a millennium.
Inching their cameras along a rail inside the chamber, specialists use powerful flashes to light up paintings of female Buddhist spirits drawn more than 1,400 years ago.
One click after another illuminates colorful scenes of hunters, Buddhas, flying deities, Bodhisattvas and caravanserais painted on the walls of the Mogao caves in northwest China, considered the epitome of Buddhist art - and which are now in danger.
From the fourth century onward, the 492 largely hand-dug caves near Dunhuang, a desert oasis and crossroads on the Silk Road, acted as a depository for Buddhist art.
"Dunhuang is where Chinese, Greek and Roman, Islamic and Indian arts meet," says Mimi Gates, a former director of the Seattle Art Museum who is helping to preserve the caves.
But their appeal is the very thing that is putting them under threat, with every visitor's entrance, body and breathing altering the delicate environmental balance inside the chambers.
The remote site in Gansu province saw 800,000 visitors in 2012, up 20 percent in a year. The recommended daily maximum is 3,000, but as many as 18,000 arrived on one public holiday last October.
"When tourists enter the caves, the humidity, the temperature and the carbon dioxide increase abruptly," said Wang Xudong, director general of the Dunhuang Academy. The wall paintings themselves contain "a lot of natural salts that have come out of the rocks over 1,200, 1,500 years, the age of these wall paintings," he said.
If the humidity is high, "then the salts can suck the moisture out of the air and start the deterioration process."
But authorities must strike a difficult balance between limiting access to visitors and avoiding alienating them, particularly the hundreds of thousands of primarily Chinese tourists whose numbers are steadily rising.
"Every child in China in growing up learns about Dunhuang. It is one of the great sites, so when they grow up they want to come here, and they do now that they have the money to," says Neville Agnew, a project specialist at the Getty Conservation Institute.
The digitization project is part of the solution, a grand project to transform the way visitors are received and cut the time they spend inside, even as numbers rise.
It is an immense task. The paintings cover 45,000 square meters.
Once the new system goes into effect next year visitors will view high-definition images of the inside of the chambers, before taking a glimpse inside the real thing - but only for a limited time.
Long after Dunhuang's heyday, the Silk Road eventually fell into disuse and it was largely forgotten by the outside world, with most of the caves abandoned.
In 1907 archeologist Aurel Stein led an expedition to the area and paid to remove large numbers of manuscripts, paintings and textiles.
A French mission under Paul Pelliot acquired thousands of items the following year, and Japanese and Russian expeditions soon followed in their footsteps.
But the latest collaboration will preserve Dunhuang for future generations, say those involved, and make the masterpieces available to academics and amateurs around the world online.