As the tram moves up the steep tracks of Artilleria Hill, I catch glimpses of Valparaiso and its port below. The ride is a mere five minutes, and at the top we emerge on a promenade lifted from the late 19th century. It has cobblestones, blossoming trees and a cast-iron railing worthy of Queen Victoria with all its flourishes.

As the tram moves up the steep tracks of Artilleria Hill, I catch glimpses of Valparaiso and its port below. The ride is a mere five minutes, and at the top we emerge on a promenade lifted from the late 19th century. It has cobblestones, blossoming trees and a cast-iron railing worthy of Queen Victoria with all its flourishes.

We stand alongside tourists and Chileans, hushed by the view before us. Valparaiso makes a perfect crescent along the Pacific Ocean, the city's famous 42 hills rising behind.

On the left lies the harbor. I catch the dim clanking of the port at work. The day is warm, almost hot, but the breeze off the ocean cools.

This is my second trip to Valparaiso. I have come with my husband, who hails from this magnificent city. I am enchanted by the glorious remnants of the city's 19th-century prominence as the Southern Hemisphere's chief seaport. The port has declined, but it is still a center for exporting fruit. Tourism and education have filled the economic gaps. Valparaiso, with only 250,000 residents, has nine universities, hosts numerous arts festivals and is increasingly becoming a popular stop for major cruise lines.

Incredibly, most cruise passengers opt to tour neighboring Vina del Mar, a resort town with a casino, manicured gardens, beaches and fashionable shops, over vibrant Valparaiso, with its European architectural gems, tangled streets, cobblestone alleys and elegant old restaurants and bars. Its Old World character has earned Valparaiso the designation as a UNESCO World Heritage Site, a place of outstanding cultural importance.

From our perch 500 feet up Artilleria Hill, my husband proposes exploring the city's corners via its fabled ascensores, funicular trams built near the end of the 19th century. Once there were 29. Today, 15 remain, each leading up a different hill to a different neighborhood. The one that brought us up here was built in 1893.

The next day we head down to Valparaiso's "plan," the city's lowest level. All along its length are base stations for ascensores. We start in the financial district, where the streets are clogged with trolley buses and the narrow sidewalks with suited men and women. I spot the entrance to Ascensor Concepcion, marked with arching metal letters in an Art Nouveau script. A dark passage leads to the antiquated station, where my husband fishes out 400 pesos and drops the coins into a cast-metal tray. For the equivalent of $1 each, we ride the city's oldest funicular, built in 1883.

After a few more people enter the tram, the door shuts and we begin our passage upward. We pass our twin heading down, equally filled with passengers. Its weight is what pulls us up.

Within minutes we arrive at a cobblestone plaza. Bright pink and orange bougainvillea spills over the ornate cast-iron fence that lines this promenade, Paseo Gervasoni, which overlooks the center of the city. I turn around and see a row of Victorian mansions painted in gay colors. Around the corner is another walkway, Paseo Atkinson. The modernist poet Ruben Dario lived at the end of this small block. He left his homeland of Nicaragua for Valparaiso when he was 19, thinking that the cosmopolitan city would expand his vision. He called it "francesada y exotica," or French and exotic, and he wrote some of his greatest poems while here in the late 1880s. We stop for tea and sandwiches at Brighton B&B, a huge gingerbread house painted bright yellow. From the black and white tiled terrace, we look out over the port where my husband once worked.

Then we explore the neighborhood. We come upon a small alley of confetti-colored houses, Pasaje Pierre Loti, named after the French novelist who also lived for a spell in Valparaiso. Purple morning glories drape over the fences, and hanging signs advertise small cafes and bed and breakfasts. It is obvious from the murals covering the walls that the neighborhood's Bohemian spirit lives on. Stencils and political graffiti pose questions such as, "What have you done for your rights?"

We thread our way up and down staircases that seem to lead nowhere and down through curving, tiny cobbled streets almost too narrow for a car. We find ourselves on yet another old promenade, this one on Cerro Alegre, or Happy Hill, where English and German merchants lived in mansions overlooking the harbor during Valparaiso's Golden Age, before the Panama Canal opened in 1914. We board Ascensor Peral for a short, almost vertical ride down. In minutes, we are back in the bustling downtown for a drink at the elegant Bar Ingles, whose doors opened in 1916.

The next day, we take the Espiritu Santo tram to Cerro Bella Vista, or Hill With a Beautiful View. It is everything its name promises, with a vista of church spires, Victorian houses and the blue Pacific always in the distance. A sign points upward to La Sebastiana, Chilean poet and Nobel laureate Pablo Neruda's house. But the road is steep and my husband says it is a good 20-minute ascent. Another sign points us downward, to the Open Air Museum, a collection of wall murals created by more than 20 Chilean artists. Some are abstract, others realistic, but all are bold. At the bottom we come upon a sparkling mosaic that covers the enclave of a tiny park. Shards of glass spell out Paseo de los Suenos, or Promenade of Dreams. We take a seat next to an older man and rest.

Each day we set out to explore more hills. We discover that some of the trams have closed since our visit two years ago. A few look shuttered permanently, and at others, improvised signs promise renovations. So we climb twisting streets and staircases until we reach the stations at the top. We zigzag up to Florida Hill with its hodgepodge of wood houses; Mariposa Hill, where women stand in the doorways of little shops; and Baron Hill at the northern end of the city, which looks over the amphitheater that is Valparaiso.

My husband saves Ascensor Polanco for last, because it is unlike any of the city's funiculars. Built in 1916, it is a two-part ride that traverses first through a tunnel and then makes a vertical rise. We arrive and find it closed for renovations until 2009. Its ocher tower sits high up the hill linked by a network of cobbled staircases. I take my husband's hand and lead him upward. At every landing, four more staircases lead off in other directions. It is a veritable labyrinth, but I keep the tower in sight. We go up and up and up. And suddenly we are there, breathless and exhausted. We look over the city. The port is far from here, the Pacific even farther. Then we look back over the steps we have climbed. We see cobblestones, little viaducts, sleeping dogs on landings and everywhere a profusion of blooming oleander, camellias and hibiscus. This is Valparaiso.