MADRID, Spain -- It was while peering through the window of the train as it snaked its way through the dry and dusty mountains of Andalusia that I saw him.

Dressed in a thick blue sweater and pants, and holding what looked like a staff, the elderly shepherd driving a flock of white sheep looked as if he'd stepped out of a 17 th-century Velazquez painting.

Don't get me wrong. My excitement at glimpsing this seemingly ancient inhabitant of Spain didn't mean I had found something lacking in Madrid's bustling energy or its sophisticated, sun-kissed people. Ever since I'd stepped off the plane two days earlier, I'd been dazzled by the modern-meets-antique sensibilities of Spain's capital city.

I'd enjoyed the first afternoon's stroll around the Baroque environs of the old city: sprawling parks sprinkled with weathered monuments and sunbathing Spaniards; Euro-chic shopping districts packed with teenagers and couples holding hands.

There was the smoky but aromatic environs of crowded tapas bars with their surreal window displays of olive oil-slicked shrimp and plump hanging legs of Iberian ham. There was the royal grandeur of the Palacio Real, built by King Felipe V on the splinters of a Moorish fortress.

But the fleeting image of the shepherd spoke to me, reminding me that there is much more to Spain than the bustling metropolis I'd just left behind.

Ahead of us were the majestic Sierra Nevada mountains with their olive orchards and crumbling castles. Beyond that lay Granada, the ancient Moorish city named after the pomegranate. Finally there was Salobrena, a Mediterranean village by the sea.

My first taste of Spain's complexity came while standing on the shiny cobblestones of Madrid's central Plaza Mayor. It was hard to imagine that the sunny square, thick with Madrilenos lunching on regional delicacies such as black-eyed shrimp and fluffy potato omelets, was once the site of bullfights, Inquisition trials and royal pageants.

The next day, we took a guided bus tour to Avila, a melancholy city an hour northwest of Madrid. Avila is famous for its tall medieval walls, which once protected its 11 th-century inhabitants from invading armies. You can walk the lonely cobblestone streets toward the Convento de Santa Teresa and stare at the relic of the mystic saint's finger resting in a tiny flower-filled vitrine.

The nearby city of Segovia, part of the daylong Pullman tour, dazzles with its immense aqueducts and imposing fairy-tale castle. During our visit in mid-September, the city was celebrating its Roman heritage with Romana Segovia, a traditional arts-and-crafts festival and living history demonstration.

It was while leaving Segovia, my eyes drinking in the parched brown countryside and thick patches of cactus dotting the rocky terrain, that I started to think about "duende," the Spanish concept of longing, sorrow and hardiness that permeates everything from dancing to literature to song.

If any landscape could inspire that, this was it.

What a surprise then, to descend the Sierra Nevadas in our rental car the following day and drive into a tropical paradise.

A lush greenery of sugar cane, custard apple and banana trees lies at the foot of the Mediterranean village of Salobrena.

From here, a side trip was made to Alhambra, the architectural marvel and "jewel of Granada."

Walking up the red dirt pathway from the main entrance gives you little indication of the splendors that lie deep within the Alhambra, the palatial ninth-century fortress sitting on a Granada mountaintop.

There are crenellated ceilings and woodwork as thick and frosty as wedding cakes. Myrtle and jasmine-ringed reflecting pools mirror the lines and angles of patios and arches.

Walking the grounds and making your way into the Nasrid and Comares palace interiors, you start to wonder if there's an end to the madness.

Apparently not. Burdened by the beauty of their meeting rooms and gleaming palaces, the Alhambra's princely builders created an adjacent summer retreat known as "Generalife," complete with vegetable patches and breathtaking landscaped gardens.

Throughout the Alhambra, the sound of water trickles in countless fountains and cisterns, flowing down the rails of a stairway known as the "escalera de agua."

Even the Moorish baths, chambers once filled with fragrant steam and the sultan's favorite royal bathers, retain vestiges of their former beauty. Shafts of light float down eerily from the stars cut into the vaulted stone ceilings.

This was a step back in time, and gave me a taste of ancient Spain. I'd found exactly what I'd been looking for.