Whenever I remember Dharmsala, India, it is as it was in the rain, at dusk, lit by the mysterious glow of kerosene lanterns and sacramental-butter lamps; children are laughing in the streets, and someone mutters Tibetan incantations from behind a closed door while a drum thuds slowly, invoking a god or goddess, exorcising some Himalayan demon. It is like novelist James Hilton's Shangri-La, or that mythical magic kingdom the Tibetans call Shambala, on the shadowline between this world and the realm of dreams: stone houses, monasteries with gilt roofs, a wall of jungled hills beyond and, lost in the clouds, the snowy peaks of the Deodar Himal.

The name itself is otherworldly -- Dharmsala means "abode of the gods" -- and to get there, you have to travel about as far as it is possible to go. You fly to New Delhi, and from there a slow train carries you northwest, across the plains of the Punjab, to the shabby little city of Pathankot. From Pathankot, a gaudy bald-tired bus travels east, up the Beas River valley, and then north, climbing the foothills, past white torrents with gravel in their throats, through subtropical forests. At Kotwali Bazaar, you transfer to a minibus with an electrically illuminated ikon of the Dalai Lama over the windscreen and a laughing young Tibetan at the wheel. Up again, faster and faster, climbing the mountain wall, past gawking Gaddi shepherds, clouds swirling across the narrow pavement, monkeys in the trees; finally, you round a last curve, into the main street of Upper Dharmsala, McLeodganj (its colonial name) . . . the end of the line.

Dharmsala was an obscure little north Indian hill village until the 19th century, when the upper crust of the British Raj began using it as one of their summer retreats, along with other high-altitude garden spots like Darjeeling, Simla and Murree. They left a legacy of cottages and guest houses in the pines, and a massive and somehow poignant Thomas Grey church slowly decaying in the forest at the edge of town.

Dharmsala continued to be a popular summer vacation retreat after Indian Independence; then, about 25 years ago, it began filling up with Tibetans -- refugees from the Chinese conquest of that high, remote Central Asian land. The Dalai Lama, spiritual leader of Tibet, settled there, followed by several thousand of his countrymen, including high lamas, nomads, traders, artists, musicians and aristocrats.

Today, the town is a microcosm of the old Tibet that is nearly extinct everywhere else: a medieval, mystical, arcane world, an authentic piece of another time. Spirit mediums go into god-possessed trances to forecast the future; tantric doctors treat the sick with 6,000-year-old medicines made of subterranean fungi and powdered wildflowers. Musicians and dancers perform eerie, clamorous Bronze Age "operettas" that tell of ancient battles, wizards and kings. A journey to Dharmsala involves not only geography, but crossing into another era.

I lived in Dharmsala for just two months, but so much happened there, of such power, that it seemed like a large piece of a lifetime. There was the Khampa woman with cheekbones that could have started a Hundred Years' War, long shining raven hair, six feet tall, who conceived a whimsical passion for me; she announced, through an embarrassed Tibetan-speaking Englishwoman, that she wanted us to run away together. "Her husband is insanely jealous, and will kill both of you if he finds out," the Englishwoman translated, while the Khampa beauty smiled and nodded, delighted. The Khampas are famous horse nomads, bandits and fighters, the Central Asian equivalent of Comanche Indians; I declined the offer, with regrets, opting for survival. It would have been a sweet way to die, but I just wasn't ready.

So much was absurdly beautiful. Evenings at the height of the monsoon, looking off to the south across the Beas valley, I watched as great waterlogged clouds the size of cities caught fire and burned over a glittering landscape of flooded paddies and jungle. On weekends my English expatriate friend, Harry, and I would hike up to the hut at Triund, past waterfalls and Gaddi villages, where the giant cedars gave way to tundra, moraines and the tail ends of the glaciers.

The chowkidar (hut-keeper) cooked up curry and tea, and joined in hilarious late-night card games with visiting Tibetans and Gaddis; the chung (barley beer) flowed like water, and at 3 or 4 a.m. they would still be at it, singing and shouting. It was wild up there: Troops of Himalayan gibbons 50 strong roamed the forests, and we found snow leopard tracks in the glacial gravel.

Most of the Westerners in Dharmsala were there to study Buddhism; the Dalai Lama had established a religious school for foreigners, where you could learn the elements of meditation and ponder the complex philosophies of Voidness, Relative Existence and Egolessness. Our teacher was a stout little bald mountain of a man named Geshe (Master) Ngawang Darjay, cheery, profoundly wise and boundlessly patient with his enthusiastic but often daft pupils. Some of the people I studied with are still there, and who knows, by now they may be well on the road to Enlightenment; I caught flashes, glimpses of it, sometimes, meditating in the middle of the night with my backbone howling in anguish and my mind burned out, exhausted -- a taste of Nirvana, a split second of that Pure Light of Reality, things as they really are.

It was not all "Om, om on the range," of course. Most of us expats lived in a horrid hotel called the Kailash, named after the famous sacred mountain in Tibet and run by a pair of fierce Khampas who had fought the Chinese as part of the C.I.A.-trained Tibetan resistance movement, and who retired to the hotel business when the fighting -- cavalry versus tanks and jets -- became hopeless. No Leona Helmsleys, they: Their beds, alas, were alive with lice, and the toilet facilities were nightmarish.

The cuisine in Dharmsala's half-dozen restaurants was similarly funky: fried noodles mixed with very, very old goat meat, dumplings called mo-mo (like third-rate Chinese potstickers), sulfurous curries. The high points were the potato mo-mo (basically, latkes spiked with hot mustard) and Tibetan tea, which many Westerners loathed but I loved: black tea, churned up with yak butter, salt and soda, into a frothy kind of tea-champagne. When made correctly, and drunk on a chilly night, it was celestial stuff.

On a darker note, a few expatriates couldn't take the physical harshness and psychological stress of Asia, and fell apart: A tall German youth meditated himself into catatonia, gave up eating and had to be airlifted home; an American girl bathed in the holy pool at the local Hindu temple, saw a vision of the meaninglessness of existence, had a nervous breakdown and went home to California. Someone else was stung by a scorpion the size of a bullfrog and nearly died; an Englishman went trekking out of Kulu, to the east, stepped on a king cobra, was bitten and died.

Still, discomfort, danger and all, it was the finest of places, and though I haven't been back in 12 years, it has never really left my dreams: the monks in their russet robes; the drums calling down gods; wood smoke; turquoise and silver; rain on the tin roofs; snow on the mountains. A real live Shangri-La.