Two days isn't really long enough to do justice to a capital city, but that's how long we'd given ourselves in both Lima and Quito, after a fantastic opportunity to visit the Galapagos meant that we had to rearrange our itinerary slightly.

Lima

After weeks of travelling through the Andes, gasping for air at high altitude and sometimes shivering at night, the warm coastal climate of Lima was a welcome change. The Peruvian capital is the fourth most populous city in South America after São Paulo, Buenos Aires and Rio de Janeiro, and stretches along the Pacific coast, where spectacular cliffs plunge towards the sea.

We were staying in the affluent Miraflores neighbourhood, which felt like a completely different Peru to Cusco and Puno. We walked along sunny streets lined by shiny office buildings and shopping centres, through Parque Kennedy and down to the seafront Larcomar mall. I wouldn't normally consider a mall to be a tourist attraction worth visiting, but this gleaming temple to western consumerism came as a complete culture shock to us. The place is like a little bit of California that's been airdropped into Peru, full of familiar brands like Gap and Calvin Klein, and the whole place was draped in over-the-top Christmas decorations.

We wandered wide-eyed around the mall for a little while, trying to process the fact that just days ago we had been struggling up a mountain to the Sun Gate at Machu Picchu, before heading back to our B&B along the Malecón, a leafy promenade that skirts the top of the cliffs. Along the way we saw wobbly cyclists, daredevils paragliding off the cliffs, and wealthy Limans out for an afternoon stroll.

On our second day we signed up for a free walking tour of the city centre, and we met up with our guide, Elvis, outside another mall in Miraflores. Once our group was assembled we all piled on to the Metropolitana, a bus that fulfils the same function as the metro system in other big cities. The Metropolitana has its own dedicated express lanes and stations on key arterial routes across the city, and the buses are unpleasantly busy during rush hour.

When we arrived at the central Plaza de Armas the police were in the process of closing off most of the square, due to a protest that was due to take place later that day. Peru is one of several South American countries caught up in Operation Car Wash, a huge corruption scandal originating in Brazil, with four former Peruvian presidents now under investigation for accepting bribes from the construction firm Odebrecht. Elvis explained that Peruvians are well and truly fed up with their politicians (who isn't?), and demonstrations have become a regular occurrence in central Lima.

The Plaza de Armas and the surrounding streets are home to some handsome buildings showcasing a range of architectural styles, from ornate baroque edifices inspired by the capitals of Europe to pastel-hued colonial constructions more in keeping with the rest of South America. Most of the colonial architecture dates from after 1746, the year the city was hit by a devastating earthquake.

Central Lima is divided by the Rímac river, and in fact the city takes its name from a mangled Spanish mispronunciation of the word Rímac. Elvis took us across a bridge to the  northern bank of the river, where some of the city's oldest colonial buildings are found, including a tiny chapel measuring 16 feet by 39 feet that claims to be the world's smallest church.

The historic centre seemed pretty pleasant compared to the downtown areas of other big cities we'd been to like Rio and São Paulo, but central Lima has a reputation for being pretty rough, and Elvis warned us to avoid walking down certain streets. Lima is a lot safer than it once was, but it still has a lot of issues with poverty and crime.

Many of these problems began with the influx of refugees from the countryside during the 1980s, when communities in the Andes were caught up in the middle of the war between the Peruvian government and the Marxist guerrillas of the Sendero Luminoso, the 'Shining Path'. The new arrivals ended up living in huge slums that cling to the hillsides on the outskirts of the city, much like the favelas that we'd seen in Brazil.

Back on the south side of the river Elvis led us to a statue of Francisco Pizarro, the founder of Lima and the man who led Spain's brutal conquest of the Inca empire. The statue was gifted to the city by an American sculptor in the 1930s, and originally stood in the Plaza de Armas. Pizarro is still a controversial figure in Peru, however, and the statue has been moved not once, but twice. It now sits tucked away in a quiet corner of a park down by the river, looking unloved and rather sad.

That evening our stay in Lima took a surreal turn. As we were coming back from dinner, a taxi pulled up outside our B&B, and a couple got out, the driver helping them to unload their bags. I wasn't really paying attention, fumbling in my pockets for our keys, but Polly stopped dead.

"Hannah!"

By some crazy coincidence, our stay in Lima happened to cross over with that of Polly's friend Hannah and her husband JP, who we hadn't seen in ages. We hadn't even realised they were going to Peru, let alone staying in the same B&B as us. We spent a couple of hours swapping travel tales over a few beers, and woke up the next morning wondering whether we might have imagined the whole thing.

Quito

While Peru is still grappling with the legacy of men such as Francisco Pizarro, the seventh country on our itinerary, Ecuador, seemed more at ease with its colonial past. We arrived just as the annual Fiestas de Quito were kicking off, a weeklong festival celebrating the founding of modern Quito by the Spanish in 1534.

One of the ways Ecuadorians mark the occasion is by piling into the back of open-sided buses called chivas and partying the night away, with music blaring out, disco lights flashing and booze flowing. Sadly no one invited us onto their chiva, so we spent our first night having a more sedate dinner on Plaza Foch, in the heart of the modern El Mariscal neighbourhood.

If we ever go back to Quito I think I'd skip El Mariscal and stay in the old town instead, which has bags more character. We spent our second day exploring these historic streets, and once again we signed up for a free walking tour to get our bearings. Our tour began with a visit to the city's main market, where we saw stalls piled high with mysterious tropical fruits we'd never heard of such as chirimoya, granadilla and guanábana.

There was also a whole section devoted to roses in every colour imaginable, including one variety with petals in the yellow, blue and red of the Ecuadorian flag. Ecuador produces some of the world's finest roses, thanks to a combination of fertile volcanic soil and its location on the Equator. This ensures a stable year-round climate, and means that the sun is always directly overhead, so the roses grow straight up.

At the centre of the old town is the Plaza Grande, surrounded on three sides by the traditional bastions of power in the city: the Presidential Palace, the Mayor's office and the former Archbishop's Palace, which now houses shops and restaurants. In the middle of the square is an independence monument laden with symbolism: a wounded lion represents the Spanish crown, while an Andean condor is depicted breaking the chains of colonialism.

Our tour guide, Sole, gave us some background on the political situation in Ecuador, and Quito's rich tradition of overthrowing, imprisoning or murdering their presidents. She also told us about Ecuador's economic crisis in the late 1990s, which led to some 200,000 of its 12 million-strong population fleeing the country. Part of the government's solution was a controversial decision to dump the Ecuadorian currency, the sucre, and replace it with the US dollar.

We returned to the old town in the evening, when the churches and palaces were beautifully lit up and several of the squares were filled with music. We admired the spectacular baroque facade of the Church of the Company of Jesus in the purplish dusk, though our backpacker budget meant we decided against splashing out on the $5 per person entrance fee to see its famous gilded interior. Instead we visited the (free to enter) Church of San Francisco, which was also decked out with a fair amount of gold.

One of the most interesting churches in Quito, and the one that dominates the skyline more than any other, is the neo-Gothic Basilica del Voto Nacional. This huge building is not the most beautiful church in the city, and it's certainly not the oldest, only constructed in the 20th century, but it's a fascinating example of Old World architecture with a New World twist.

At first it looked like a fairly standard Gothic construction, but when we looked closer we realised that the gargoyles were actually statues of some of Ecuador's most iconic wildlife. This stone menagerie included penguins, turtles, iguanas and blue-footed boobies; all species that we were about to see on our trip to the Galapagos.