Vittala Temple, in the southwestern Indian state of Karnataka, is the site of this stone chariot, a shrine that once held an icon of the Hindu god Garuda. It is one of Hampi's most exquisite temples. (St. John Barned-Smith/For The Washington Post)

I peered over the edge of the Queen’s Bath, an immaculate, now-empty pool where the ladies of one of India’s great empires once used to bathe. Then my guide, Kumar, pointed outside. “That’s the moat,” he said, motioning toward a deep trench ringing the building we were in. “The king filled it with crocodiles so that no one could watch” the queen in her bath. Bad luck for any would-be peeping Toms.

The bath was just one of many amazing buildings that I saw during my visit to Hampi, a small town in the southwestern Indian state of Karnataka. The town, with only a fraction of the population that once inhabited it, is quiet and sleepy now, but centuries ago, it was the site of the city of Vijayanagar, the capital of the once great Vijayanagara Empire that stretched across a vast swath of southern India from the 1300s to the 1500s. The “Kingdom of Victory,” as it was known, reached from the western port of Goa to India’s eastern shores and as far as its southern tip, Cape Comorin. Now, only its ruins remain.

Details, Hampi, India

I first came across a mention of Hampi in a guidebook while visiting Nepal, where I’d gone to attend the wedding of a friend from college. Dubious at first (I’d heard of the Golden Temple, the Taj Mahal, and the glitter and hubbub of Mumbai, but what was this hidden kingdom of the south?), I asked travelers I met in Nepal for advice. I was persuaded to visit after listening to rave reviews from travelers I met while trekking in Nepal. “Hampi? Go!” was the just about universal consensus.

On my first day in Hampi, I wandered over to the police station to register my passport and camera (a requirement for foreign visitors) and then to some of the small temples nearby. They were squat, square affairs, supported by simple rectangular pillars of granite, tiny compared with some of Hampi’s other structures and statues. Later in my visit I discovered a statue of the Hindu god Ganesh, made from a single 18-foot-tall piece of rock. It was still perfectly intact but for the trunk and belly, which had been smashed off by the angry invaders who laid waste to the city in the 1500s.

But I barely noticed these statues at first, because I couldn’t stop staring at the landscape, which looked as if it had been plucked from Mars. It was littered with magnificent red and ochre boulders that formed small hills or beautiful natural statues, a cross between deliquescing ice cubes and weirdly eroded blocks from a Salvador Dali painting.

Hampi, according to the Hindu epic “Ramayana,” was the birthplace of the monkey-god Hanuman. These behemoth red and brown granite stones looked like the remnants of his lost collection of marbles, deserted after his last toss. They were hemmed in by green canals and a blue river wending its way around and through the landscape.

I spent the day wandering through the blistering heat, trying to take in as much of this visual feast as I could, dodging spiky cacti and monster millipedes. At one derelict temple, little more than a pocket-size hole sandwiched between larger boulders, a tiny woman dressed in a green sari beckoned me over. Her skin was deep brown and wrinkled from long hours in the sun. A small flame flickered inside the temple, in front of a vaguely feline predator drawn on the back wall. She motioned me inside and spoke a few incomprehensible words, then dabbed some red paste onto my forehead, before thrusting her hand out for a tip and shooing me on my way.

I came next to the Achyutaraya temple, an abandoned compound of red-capped structures that was housing a tribe of shade-seeking monkeys instead of worshipers. An empty bazaar bordered the boulevard that emanated from the temple. It was a long, covered causeway offering only shade in the summer heat instead of an empire’s treasures. But during its heyday in the 1400s, Abdur Razzak, a Persian ambassador to the kingdom, wrote: “Each class of men belonging to each profession has shops contiguous the one to the other; the jewelers sell publicly in the bazaars pearls, rubies, emeralds, and diamonds.”

On that first day I focused less on the empire’s weighty history than on one of Hampi’s current treasures — Lakshmi, the town’s holy elephant. I found her in the still-used Virupaksha temple, a much grander affair than those small temples tucked into the hillside. The Virupaksha temple looked like a lost Mayan ruin, a 160-foot-high, cream-white pyramidal cone of intricate columns and statues. Inside the temple complex, I found quiet hidden chapels, murmuring monks and, in a tucked-away corner, Lakshmi. A pair of young boys offered her a coin and then stood frozen in delighted awe as she tapped a blessing on each of their heads. The next morning, I watched her attendants lead her down to the river for her morning bath.

A mighty past

On my second day, elephant spotting completed, I visited more monuments and temples, this time with Kumar, my guide. As we wandered past the city’s mighty statue of Ganesh, he told me the local legend about the city’s founding. The Telegu prince Harihara Raya chose to build his kingdom in Hampi after visiting it in 1336 and watching a tiny rabbit attack and chase his dogs into quivering submission. “He saw that the earth was so powerful [to produce such a fierce rabbit] that he wanted to build it here,” Kumar said.

Luck or fate was on the prince’s side. Vijayanagar grew quickly over the next 200 years, mustering million-man armies, constructing thousands of temples and housing 500,000 people, a population second only to that of Beijing at the time. It attracted explorers and traders from far-off Portugal, Russia and Italy, as well as Mongols, Persians and Arabs.

Hundreds of years later, Hampi seemed littered with monuments, but otherwise fairly empty. Until recently, people lived in the shadows of the temples, even building shops and homes in some of the abandoned bazaars. But over the past year, the government forcibly evicted around 350 families in the name of protecting the statues and temples, which are a UNESCO World Heritage site. (The government plans to move the displaced residents to a new site about three miles away and give them compensation to build new homes. But so far, locals told me, it has taken little action in this direction.) For now, the smashed houses and storefronts are a grim modern reminder of the fate that the village’s mighty ancestor faced centuries ago.

“I never saw a place like this,” said Nicolo Conti, the first European to see the Vijayanagara Empire when he arrived in 1420. I couldn’t get the same thought out of my head.

A Roman-style aqueduct, helped along by later Italian visitors, carried water to the city from a lake a few miles away, Kumar said. I found myself almost looking for a water tap to see whether it still worked. Where was this place in history class? Hampi (or Vijayanagar) was, in its heyday, “a city with which for richness and magnificence no known western capital could compare,” wrote British historian Robert Sewell in “A Forgotten Empire: Vijayanagar.” I’d studied Alexander the Great and Genghis Khan, the great Western explorers, and more. But there’d been no mention of this mighty empire — unless I’d been napping in class that day. This new, unexpected discovery was both humbling and exhilarating, a sliver of what those Europeans must have felt when they first wandered into this cosmopolitan kingdom in deepest India.

A crumbled empire

Medorian Gheorghiu, a sun-baked Romanian I’d met during my wanderings through the town, sat in a small bit of shade next to Hampi’s main bus stand and chatted with me as we tucked into a meal of rice and coconut curry that we’d bought from a nearby street stall.

“I have the feeling that nothing’s changed,” he said as we chewed on mango slices after our lunch. I had the same feeling.

When I visited the massive stables where one Vijayanagara king quartered 11 elephants — including his prized albino — I could picture them snacking on sugar cane and bananas.

While wandering through the ruins, I felt that if I turned my head and squinted just so, I’d almost be able to see what it must have been like during Vijayanagar’s days of glory. In the Royal Centre, the king’s private swimming pool — bigger than an Olympic-size pool! — looked as if it could have been filled with water and ready for lessons and laps the next day. There were dozens of small temples, larger complexes, baths, water storage tanks and statues. By the end of my second day, I’d seen so much that I could barely register the magnificence of the Vittala Temple, an immaculate complex of statues and shrines, and one of only three sites in India with a stone chariot (a small temple on a wheeled platform).

This Indian Rome wouldn’t last, however. In 1565, an alliance of Muslim invaders known as the Deccan Sultans laid waste to the empire, defacing statues, razing temples and putting the empire’s citizens to the sword.

“For a space of five months Vijayanagar knew no rest. The enemy had come to destroy, and they carried out their object relentlessly. They slaughtered the people without mercy, broke down the temples and palaces,” Sewell wrote. “Never perhaps in the history of the world has such havoc been wrought, and wrought so suddenly, on so splendid a city.”

But even with all their carnage and destruction, the Deccan invaders couldn’t erase the grandeur of the place.

“Of all the places I’ve been in India, I like Hampi the best,” said Gheorghiu, who had just spent several months traveling around the country. “It’s like the fighting stopped yesterday.” Now, after spending two days walking through Hampi, I agreed with him.

The din, the smell of spice, the rustle of fabrics, the clink of coins and the creaking of scales, the muffled grunts of the elephants, the stench of the food and the waste and the animals, the press of humanity. It was all hidden just beneath Hampi’s surface, ready to leap from the rocks like that dog-chasing rabbit 700 years ago.

Details, Hampi, India

Barned-Smith is a journalist currently living in Boston.