Read the story
In 1022, the invader Mahmud of Ghazni laid siege to the Chandela fortress of Kalinjar. The fort held. The siege ended not in surrender but in a truce, with the two rulers exchanging gifts.
The man behind those walls was Vidyadhara, a Chandela king who ruled from around 1003 to 1035, and he had a reputation to protect. When Mahmud took Kannauj four years earlier, its king fled without a fight. The twelfth-century historian Ibn al-Athir wrote that the king of Khajuraho killed the king of Kannauj as punishment for that cowardice. Vidyadhara's own first clash with Mahmud, in 1019, ended inconclusively, and chroniclers can't even agree whether a battle was fought. Mahmud's historians later recorded the gifts from Kalinjar as tribute. Vidyadhara saw it differently.
He answered with a mountain. Here in Khajuraho, the Chandelas' original capital, he raised the Kandariya Mahadeva, a temple to Shiva, his family's god, built to celebrate his success against Mahmud and other rivals. An inscription on one of its pillars names the builder as Virimda, which scholars read as another name for Vidyadhara.
Stand back and look up. The tower climbs thirty-one meters in rising tiers, peak behind peak, eighty-four miniature spires gathering toward one summit. It is meant as Mount Meru, the mythic mountain at the source of creation. More than 870 statues, most about half life size, crowd the walls in three bands: gods and goddesses, musicians, celestial dancers called apsaras, and, tucked into the niches, the frankly embracing couples Khajuraho is famous for.
Then step inside, beneath an entrance garland carved from a single stone. The light falls away. In the dim sanctum sits Shiva's linga, and the name finally makes sense: Kandariya Mahadeva, the Great God of the Cave.
Outside, a mountain. Within, a cave. A king no invader could pry out of his fortress built himself another one, and it has stood for nearly a thousand years.