The singing, chanting and whistleblowing woke me at 5am. I really could have done with a bit more sleep to get over the 22 hour flight from Auckland to Santiago and on to Quito. But I couldn't stop myself from taking a look out the window to see what was going on.
Outside, marching up the ancient cobblestones of Avenida Garcia Moreno, past the official palace of the President of Ecuador, about 100 people were escorting a large figure of the Virgin Mary in the direction of the towering spires of La Basilica, chanting as they went.
Forgetting for the moment that I was only wearing sleep shorts, and that at 2850m up in the Andes mountains Quito's nights tend to be a little cool, I dashed out onto the little balcony of the Plaza Grande Hotel to get a better look.
It may have been a coincidence, but just as I arrived above the marchers there was a silence followed by a big cheer, then the leader resumed chanting what I later learned was a prayer to Our Lady of Sorrows.
A combination of the shock of the cold on my bare skin and the jetlag meant I was still awake at 5.45am when the marchers came back down the road still chanting enthusiastically.
And I was definitely awake at 7am when a burst of bugles came from the presidential palace, apparently signalling the arrival at work of President Rafael Correa, which, if true, made him an impressively early riser.
Forewarned by the previous experience I pulled on a jersey and went out on the balcony, where the rays of the early morning sun were starting to light up the city's skyline, and was in time to see a spectacularly uniformed guard hoisting the presidential flag on a flagpole on the roof of the palace.
Back down at street level more guards - I later learned their uniforms were French, dating from a time when France provided assistance in the struggle for independence from Spain - were marching into position to safeguard the palace.
It was an appropriate introduction to Ecuador's capital which is very much a city of church and state, of religious processions and state ceremonies, as well as being both smack on the equator and the second-highest capital in the world (after La Paz, Bolivia).
The city was originally founded more than 1000 years ago by the indigenous Quitu people, briefly became a capital for the Inca empire, was conquered by the Spanish in 1534 and in 1830 was named as capital of an independent Ecuador.
But, as local historian Julio Rivas explained as he showed us around his city, in many ways it was the Inca, who ruled for the shortest time of all, that laid down the shape of the modern capital.
That's because one of the first things they did was to underline the change of control by building Catholic churches on top of all the old temples - the first church was actually built before the city was even officially founded - and then they effectively built the city around the churches.
At the heart is an open space, these days known as Independence Square, framed by the Presidential Palace, the Cathedral - noted for its painting of the Last Supper showing Jesus and the disciples dining on a guinea pig - the Archbishop's Palace and my hotel, the wonderful Hotel Plaza Grande.
It's a lovely spot to rest under the trees and enjoy the passing parade, and many locals do just that, but there's much more than that to see in a city which in 1978 joined Krakow in Poland in being named by Unesco as the first World Heritage sites.
Indeed, as Julio explained while he led us through the charming cobblestoned streets, there are 35 major churches in the city centre and maybe 70 smaller churches and chapels. "We don't have palaces and castle in Quito. We have churches."
I think his favourite, and the one he led us to first, is La Merced, built about 300 years ago on top of the temple of ordinary praying, which as its name implies was apparently the place where the common folk came to pray in the days of the Inca empire.
That atmosphere of openness has obviously been retained in the church despite its grandeur. An elderly priest was standing at the entrance, offering every visitor a friendly handshake, a warm smile and a few words of greeting, in between times chatting amiably to the vendors of candles and holy pictures. In the sacristy, with its extraordinary pictures of archangels, a women's group was meeting. And in the impressive cloisters a wrinkled old man was sitting in the sun at the foot of a huge stone cross happily reading his newspaper.
But the main feature of the church is its extraordinary collection of paintings - "four centuries of art," said Julio proudly - including not only religious works but also pictures of volcanoes erupting above the city. It also has the highest tower in old Quito and Julio took us up on the roof to enjoy the amazing views over the city and its surrounding volcanoes. I noticed that he didn't take us inside the tower itself, perhaps because - as I later read in the Lonely Planet guide to Ecuador - tradition has it that the tower was never consecrated and so was possessed by the devil.
Even more spectacular is the 400-year-old La Compania de Jesus - the Jesuit Church - an amazing example of baroque art, glittering with the vast quantities of gold the Spaniards dug out of Ecuadorian soil, and decorated with extraordinary paintings, including - unusually - pictures of indigenous plants and people.
Most delightful of all, as Julio pointed out with a giggle, one of the angels on the church's facade is quite clearly giving the finger to someone over the road. On the front of the shop opposite a sweet little cherubim is displaying a giant penis, the result set in stone of an ancient dispute between the two builders.
Oldest of all the religious establishments is the Monastery of San Francisco, construction of which began only a few weeks after the city was officially founded in 1534, though earthquakes and fires mean it has had to be rebuilt many times over the years.
The monastery church was being restored but Julio, after an argument with the construction workers, managed to get us inside so we could see its gilded artworks, protected beneath shrouds of plastic, and - most intriguing of all - the hundreds of skeletons buried beneath the floor which were revealed when the floorboards were removed.
The monastery also has a museum of religious art which includes several of the treasures removed from the church while work is going on. One is a spectacular larger-than-life sized figure of Jesus carrying the cross, known as "the Christ of Power" because of its great potency.
There, too, we found the figure sculpted in 1734 and known as the Madonna of Quito, winged and standing on a snake, so revered by locals it was sent to Spain to serve as a model for the 40m high aluminium statue of the Virgin Mary which presides over the city from the top of the hill of El Panecillo. While the statue awaits its return to the church altar its hands have been removed and are on display inside a plastic box.
I imagine that means it wasn't this particular figure that was carried past my hotel room at 5am. But then this is a city with a great many statue of the Madonna.
Getting there: LAN Airlines flies daily from Auckland to Santiago with onward connections to Quito.
Getting around: World Journeys offer a six day, five night Ecuador package from Quito to Cuenca, experiencing traditional cultures, haciendas and the Chiva Express train. Phone 0800 11 73 11.
Jim Eagles went to Ecuador with help from Lan Airlines and World Journeys.