At the edge of the vast Gobi Desert, 29 hours by train from the nearest city across a barren wilderness of sand and shale known as the "Land of the Wind," lies an astounding religious shrine: the Caves of the Thousand Buddhas.

Located at Dunhuang, a remote oasis on the old Silk Road in northwest China, the caves are China's oldest and richest repository of Buddhist art, and one of the least-known wonders of the world.

The Caves of the Thousand Buddhas, or the Mogao Grottoes, are a labyrinth of nearly 500 caves carved out of a sandstone cliff face more than half a mile long and 10 stories high. Each cave is a treasure trove of Buddhist art, containing life-sized painted clay sculptures of the Buddha and other figures and elaborate wall and ceiling paintings. Some caves are enormous, carved out of almost the entire height of the cliff. One houses a colossal Buddha that, at 08 feet, is 1 1/2 times the size of the Sphinx. Another houses an 85-foot Buddha, and still another -- a large horizontal cave -- a colossal, gilded reclining Buddha.

Why would the Buddhists build such a significant shrine in such a remote location? Because the position of Dunhuang is one of supreme importance in Buddhism, located at the juncture of two caravan routes via which Buddhism gradually penetrated China at about the time of Christ.

The caves contain 2,000 painted clay sculptures and thousands of feet of tempera murals, providing a chronicle of Buddhist art styles over the course of 1,000 years and eight Chinese dynasties, starting in 366 A.D. Many more artworks, carted away (the Chinese would say looted) by Western Sinologists during the early part of this century, now reside in museums such as the Louvre in Paris, the British Museum in London and the Fogg Art Museum in Cambridge, Mass.

Indeed, the tragedy of this religious shrine is that many of the works have been defaced by greedy art collectors who have cut out square patches from the middle of beautiful murals and hacked off the heads and hands of the sculptures.

Few Westerners are familiar with this complex of caves, partly because of their remote location (even the intrepid traveler Marco Polo found them too far off the beaten path, although he passed nearby) and partly because the Communist government has only recently opened up the area to foreigners. Even now, the Japanese, who have a greater interest in the history of the Silk Road than Westerners, make up the majority of visitors.

In fact, our party of 10 would be among the first American groups to visit the shrine, according to officials in the Peking office of the government tourist agency, the China International Travel Service (CITS). Our silk-route tour had been arranged by a travel agent for a small group of her close friends and acquaintances. My fellow travelers were all retirees, except for the agent and her dentist husband, and some of the group had been to China with her on an earlier trip. We were to spend almost two days in this desolate area, exploring these spectacular caves -- which are considered one of Buddhism's greatest artistic achievements.

The Silk Road was the major link between east and west for more than 1,000 years; in the 2nd century B.C., the Chinese Emperor Wu and the King of Parthia exchanged ambassadors and gifts via this route. One branch led west to Samarkand, and another south from oasis to oasis across the desert and the high mountain passes of Afghanistan to India. Chinese traders carried silk, tea and porcelain westward, and returned with gold and silver from India and the Middle East and with new faiths, including Buddhism, Islam and Christianity.

Inscriptions in the caves reveal that carving was begun in 366 A.D. by a Buddhist monk named Yue Zen, who was traveling through the area and saw a vision of a thousand Buddhas. The shrine blossomed over the next millennium as a center of Buddhist art. Traders commissioned Buddhist monks to decorate the caves as a dedication to the success of their expeditions.

In these caves traders prayed for a safe journey on their departure, and offered thanksgiving upon their return. One cave inscription dating from 947 A.D. asks for the protection of the gods "so that the district will prosper and the routes to the east and the west will be open and free, and that in the north the Tartars and in the south the Tibetans will cease their depredations and revolts."

In all, 1,000 caves, linked together by underground corridors, ladders and picturesque wooden balconies, were carved out of the cliff face. Only half survive, the rest having collapsed or been filled in by the desert sand.

After the 14th century, when caravan routes were replaced by sea traffic between east and west, the grottoes declined in importance and were eventually forgotten. They were rediscovered in 1899 by a Taoist monk named Wang Yuan, who took refuge in the caves while fleeing the famine in a nearby province. The story goes that he was clearing out a cave when part of a wall collapsed. Thinking the wall to be hollow, he broke part of the way through, where he discovered a small door. The door opened into a small secret chamber crammed full of treasure that had been hidden by monks fleeing the persecutors of Buddhism in 1036 A.D. The chamber contained an estimated 50,000 priceless artifacts.

Wang Yuan reportedly tried to interest the government in the artifacts. When no interest was expressed, he simply sold them off to Western Sinologists, using the money to restore the caves. The chief beneficiaries were Britain's Sir Aurel Stein and France's Paul Pelliot. The secret cache is said to have included embroideries, paintings, ritual objects, gold and bronze statues of the Buddha, and sutras and other documents written in Chinese, Tibetan, Sanskrit and other ancient languages. The earliest dated from the 5th century and the latest from the 10th century.

Other artifacts were stolen by local officials, Chinese soldiers and Western collectors. The plunder continued uninterrupted until 1949, when the Communist government came to power and closed the area to the West.

The Gobi is a general term applied to the deserts of the vast inner Mongolian plateau that stretches across northern China. Here, the Gobi merges with China's other great desert, the Taklimakan, a 900-mile-long sea of dunes. In the folklore of the Uighur people, a minority nationality of Turkish origin who make this desolate waste their home, Taklimakan means, "Once you get in, you can never get out."

Until the early 1960s, this area was almost as remote as it was during the days of the Silk Road. Since then, however, the Xinjiang Railroad -- which links Uru mqi, the capital of the neighboring province of Xinjiang to the northwest, with Lanzhou, the capital of the province of Gansu, in which Dunhuang is situated -- has helped the Chinese government open up the mineral wealth of its vast northwest. The express trains that ply the ancient caravan route through the desert have helped to turn the cities of this area from remote backwaters into prosperous industrial centers for China's iron, steel and petrochemical industries.

The caves, many of which exhibit the wear and tear of the elements, are 15 miles southwest of Dunhuang. The interiors have been damaged by the relentless desert wind and water erosion caused by flooding in the river valley.

Many of the paintings have been blackened by smoke from the cooking fires of White Russians who took refuge here from the Bolsheviks. Still, the brilliant colors of the paintings have been remarkably preserved in the dark, dry interiors of the caves, and efforts are underway to prevent further damage. Doors and walls have been constructed to prevent weather damage, foundations have been laid under many of the statues and preservatives have been applied to the murals.

The caves range in height from eight or 10 feet to almost 10 stories. Each has an identifying marker, giving its number, approximate date of the artwork and the name of the ruling dynasty. The ceilings are coffered, and most are painted with a pattern of tiny Buddhas -- the thousand Buddhas from which the caves take their name. The walls contain niches where the monks lived, some of them so large as to constitute separate caves. Almost every cave contains a dais mounted with a statue of the Buddha and other figures. The walls are completely covered with lovely paintings, whose subjects are the Jataka stories (episodes from the life of the Buddha), religious parables and Chinese folktales.

The centerpiece of the sacred cliff face is the Temple of the Great Buddha, a 10-story wooden fac,ade painted in deep oranges and golds that shelters the giant cave housing the Buddha colossus. The corners of the upswept eaves are hung with wind chimes, which sway in the breeze, their eerie jingle punctuating the desert stillness. The function of the chimes is to drive away the evil spirits.

Inside, the Buddha rises 108 feet from his crossed legs to his serene face, created from clay by ancient sculptors. Because the soft sandstone of the cave walls is not suited for carving, the technique used for the colossi (including the 85-foot and the reclining Buddhas) was to carve a rough figure out of the solid rock of the cave's interior, coat it with clay and then mold the details. Most of the other sculptures in the caves are made entirely of clay.

Most of the caves are closed to the public. Some are in poor condition, others are undergoing restoration, and still others are said to contain sexual art that is considered decadent by the Communists. The caves that are open, however, must be unlocked by guides who aren't always as conscientious as they might be.

Once we got across the message that we wanted to see more than a few caves, our guide was very accommodating, but this took some doing. In one day, we visited two dozen or more caves representing eight dynastic periods: Northern and Western Wei, Sui, Tang, Five Dynasties, Song, Western Xia and Yuan. Visitors would do well to take along a flashlight, since the caves are unlighted.

Apart from the caves, Dunhuang has few tourist attractions, and the town itself is not very attractive.

We did take a late-afternoon camel ride through the desert to a small, spring-fed, clear blue, crescent-shaped lake surrounded by giant sand dunes. In the late afternoon light, the long shadows of the sculptured dunes against the deep blue sky created an abstract picture of incredible beauty. The local people have a saying, "The skill of man made the Caves of the Thousand Buddhas, but the hand of God fashioned the Lake of the Crescent Moon." Nearby, fields had been reclaimed from the desert by plantings of poplar trees, which protect the land from the sand-bearing wind and the advancing dunes.

After a day and a half in Dunhuang, we boarded our bus before dawn for the ride back to the train station. The sun was rising as we drove through the Gobi, casting a veil of pink over the landscape. The highway, which had been deserted on the afternoon of our arrival, was alive with plodding camel caravans and donkey carts hauling cotton and other produce to market in the cool early-morning light. Herds of camels grazed placidly near the yurts of their herdsmen.

In Liuyan, we boarded the train for the 29-hour ride southeastward to Lanzhou, the nearest city. On the way, we passed the westernmost tower of the legendary Great Wall, on the edge of the great beyond. The exit of this fortress, known as the "Gate of the Bravest People in the World," was -- to the ancient Chinese -- the place where the civilized world ended.

In total, we had traveled 52 hours along the old Silk Road in our expedition to the west -- rail-age pilgrims to an ancient shrine.