Once a jewel of the Spanish colonial empire, the historic core of this capital city spent decades in a downward spiral, reeling from urban flight, high crime and official neglect.
By day, the narrow cobblestone streets were clogged with legions of sidewalk vendors who harassed pedestrians and blocked traffic. By night, thugs and prostitutes lurked among the colonnades and alleyways.
Tourists risked their lives and wallets by strolling after dark through San Francisco plaza, which, with the baroque facade of its namesake church, the cordon of 17th century buildings and the majestic Mt. Pichincha looming overhead, is one of Latin America's most breathtaking tableaux.
Foreigners headed for the Galapagos Islands and the Amazon largely bypassed Quito's lovely center, despite the city's world "cultural patrimony of mankind" designation by UNESCO in 1978.
As a result, the colonial ambience and the treasures of 100 downtown churches and monasteries, including towering gilded altarpieces and eerily lifelike sculptures from the 17th century "Quito School," remained well-kept secrets.
As in many other Latin American capitals, middle-class residents and upscale businesses fled for the suburbs, seeking security, better shopping and less traffic. They left behind city centers that lost their civic pulse and pride.
Quito came close to dying after an earthquake in 1987 that left many buildings in heaps of rubble, said Carlos Pallares, an architect and executive director of FONSAL, a government-funded redevelopment agency.
"Downtown Quito almost became a lost cause," he said.
But now there are signs of life.
A tax-funded revitalization program that dates from the late 1980s is finally gaining momentum -- and raising hope that Quito's old center might realize its undeniable tourism potential and reclaim the tens of thousands of residents who have fled.
Residents have begun to trickle back, attracted by low-interest loans for renovating their houses or apartments.
Helped by foreign donors, the city now spends nearly $70 million a year restoring downtown landmarks. Recent projects include the centuries-old Jesuit La Compania, La Merced and San Francisco churches.
The showpiece of the renovation effort is Calle de la Ronda, a three-block mini-barrio of 300-year-old houses and shops that offers a vision of what a rejuvenated Quito could look like. To walk the undulating street and drop into the beam-ceilinged restaurants and shops that in some cases have been open for two centuries is to step into a kind of time warp.
Following what the agency believes is the winning formula for Quito's revitalization, FONSAL agreed to finance the renovation of houses in Calle de la Ronda only if owners promised to live and work there. Granted, it's a tiny section of downtown, but on weekends Calle de la Ronda is jammed.
Officials say Quito's center turned a corner in 2003 when it banished street vendors, as potent a political entity here as in Mexico City, and made the prohibition stick. Vendors were moved to dozens of permanent locations, including a former slaughterhouse in the downtown's periphery.
"The departure of the street vendors brought about a rediscovery of the city," said architect and historian Alfonso Ortiz Crespo. "A lot of Quitenos had simply forgotten it."
Since 2003, four high-class hotels have opened in Quito, and the average stay in the city has stretched to 3 1/2 days from 1 1/2 days, as tourists linger to take in the sights.
Renewal here is a work in progress, and the jury is still out on whether Quito can accomplish what Ortiz Crespo described as the true test: "an intangible feeling of solidarity and belonging among the residents."
For Victor Guaita, who has run a restaurant called Picanteria La Ronda for 30 years, the hurdles are more prosaic. The city center needs more parking garages and more concerts to draw visitors.
"I also want to know that all this effort will continue, that in three years, the city won't forget about us again," Guaita said.