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. From the window of my room in the academy’s guest house I could see dozens of these hollows set high up on the cliff, their low entrances black with shadows. 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 free-standing 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 chiseled 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 molded 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 encyclopedic archive of styles and ideas, of dashes forward and retreats to the past.