Our guide Ong advised casually: "Watch out for the crocodile." I stopped dead in my tracks and peeled my eyes from the slippery cave floor to look at his retreating back, a few steps ahead. When he turned, the smile in his eyes told me there was nothing to be afraid of: the reptile he was referring to was a limestone statue with unmistakable jagged jaws. I wouldn't have been surprised had it been a real one. So far I'd encountered bats, beetles, a centipede, a snake – coiled and hissing – and a spider with sharp, slender legs as broad as a dinner plate. This dark, humid cavern, it seemed, is a popular hangout for local wildlife.
Like them, I was happy to escape the crowds. The cave is part of an extensive network in Pang Mapha, in the far north-west corner of Thailand, a few miles from the Burmese border. It's a 90-minute drive from the backpacker town of Pai, and four hours from the provincial capital Chiang Mai, and the solitude is a welcome antidote to their touristy trappings.
I was staying at Cave Lodge, a genial, rustic place overlooking the Nam Lang river, just outside the village of Ban Tham Lod. Built by hand out of local teak by the owner John Spies, an Australian who settled in the area some 30 years ago, the lodge is homely and welcoming, but close to nature. My small veranda clung to a precipitous slope above the river bank with a wall of forest opposite. At night I could hardly make out the nocturnal hum of insects above the roar of the water, made wide by the monsoon rains.
The entrance to the cave system is through Tham Lod ("through cave"), the central and largest of the caverns. The cave was a short walk from our simple bungalow alongside the water's edge, but I chose instead to kayak. (Some of the caves are accessible only from the river.)
Paddling through the fast-flowing water into the cave's mouth, Ong and I entered a vast chamber. Huge stalactites drooped deep into the centre of the cave. With their putty-coloured, flowing contours, they looked as if they could have been made of melted wax. We landed on a stretch of coarse sand. The air inside was cool and damp and I looked around at walls of crystal that sparkled brighter than Tiffany's windows.
Each cave had its own idiosyncrasies, as if nature were decorating the different rooms of her house. In one, close to ground level, the re-formed limestone took on weird organic shapes: rounded, visceral forms reminiscent of the extraterrestrial eggs in the film Alien.
Most spectacular of all is the Tham Pi Man, or "spirit cave": an ancient site where 1,700-year-old coffins were once discovered, perched atop one another on wooden scaffolding. The coffins were between five and seven metres long, each of them hewn from a solid teak log.
The local Shan population believes that tall, sinister spirits are interred in these massive sarcophagi. An ethnic minority group that emigrated from neighbouring Burma some 200 years ago but who roots lie in southern China, most Shan are Theravada Buddhists, but continue to hold on to their ancient animist beliefs. Excavations of Tham Pi Man, however, found that those responsible for the log coffins were not malicious spectres, but members of a lost culture.
"Inside one cavern we found unsmiling human faces carved on the outside of two coffins," recalls Spies in the book he has written on his many adventures in the region, Wild Times: 30 Years on the Thai Border. In another "we photographed a complete human skull that an ancient flow of calcium rich cave water had cemented into the flowstone floor".
In this region of porous national boundaries, the ebb and flow of cultures continues. As well as Shan, the Black Lahu, Red Lahu, Hmong and Lisu peoples have crossed the Burmese border to settle in these remote mountains. In his memoir, Spies describes the time he spent living among the Black Lahu and Shan peoples. "I knew we were catching the last glimpses of ancient cultures in the mountains of northern Thailand," he says. It's hard not wonder about the fate of these once-strong traditions. Will they soon be consigned to the past, like the creators of the mysterious Tham Pi Man?
Cave Lodge (00 66 53 617203; cavelodge.com). Dorm beds start at 120 baht (£3.20), doubles from 400 baht (£8.50), room only. Kayaking, trekking and caving trips are arranged through the lodge with prices from 300 baht (£6.50) for a day's tour.