Raul Aguagollo likes to reminisce about the old days, when thousands of criminals lived next door to his food stand. He leans an elbow on the small makeshift structure: salvaged metal sheets hammered together and splattered with graffiti. Three bottles of Coca-Cola sit on a ledge above a gas stove simmering with oil for frying plantains and empanadas.

Here in San Roque, a sprawling, working-class neighborhood in Quito, Ecuador, a prison called Garcia Moreno operated for almost 150 years. Ousted President Lucio Gutiérrez did time there for conspiracy against the state. So did Dante Reyes, a legendary con man known for his eccentric scams and identities—he once posed as the son of the Costa Rican president, and in another instance as a Japanese businessman named Dante Makoto Chim Bolo. Eloy Alfaro, the country's most famous revolutionary leader, was held at Garcia Moreno until his enemies in the ruling government broke in one day in 1912, shot him, dragged his body through the streets, and burned it in a public park.

Aguagollo heard tales of Garcia Moreno's occupants from prison guards who visited his stand on their breaks and gossiped while snacking on plantains. That ended in 2014, when the prison closed and the inmates—nearly 2,000 in all—were transferred to facilities across the country. "It shamed one to see the scene, how the police grabbed them," says Aguagollo, squinting as he remembers. "[The prisoners] were crying. But buses were waiting, and they were muscled in."

The government shuttered Garcia Moreno after horror stories emerged. There was rampant overcrowding; some wings were over capacity by 400 percent. To squeeze more people in, beds were placed on hastily constructed wooden platforms that nearly touched the ceiling. Corruption was rife, with drug lords like Óscar Caranqui, Ecuador's "El Chapo," living in five-star cells complete with televisions and expensive sound systems. In other cells, seven people were crammed into spaces designed for two. Guards were paid to look the other way.

Before opening his food stand, Aguagollo worked briefly inside the prison. When asked about the conditions, he chuckles. "They don't call it a prison for nothing," he says.

"But," Aguagollo adds, "better the devil you know." When the inmates left, San Roque changed—and not for the better, residents claim.

Raul Aguagollo at his food stand. All photos by Frank Martínez

One of Quito's oldest neighborhoods, San Roque is wedged between the colonial plazas and elaborate churches of the capital city's centro historico and La Cantera, a suburb known for brothels, drugs, and petty crime. Stray dogs sunbathe on steep cobblestone roads that weave between near-collapsing, century-old homes. San Roque's beating heart is its market, a dizzying labyrinth of more than 3,000 stalls spilling out from a four-story building onto the surrounding streets. Almonds are sold from sacks the size of small children. Fish carcasses are piled on beds of ice. The smell of coriander blends with earthy palo santo incense. In one stall, indigenous women speak in local Kichwa but switch to Spanish to explain the prices of flour and corn to customers. In another, Afro-Ecuadorians selling fruit and vegetables make dirty jokes about the size of cucumbers.

According to Galo Guachamín, president of the San Roque Association, which represents the local merchants' interests, sales at the market fell by at least 30 percent when the prison closed. Taking care of inmates was big business: The market was the primary source of food, clothing, and even furniture for Garcia Moreno.

"Before, sure the visitors would come. All the time. Every day," says Gloria Buenaño, who sells juices in the market's food court, wearing a tight bonnet and a blue apron over her long-sleeved shirt. "Now there is no one. No one!" Buenaño picks up a plastic jar holding a single $10 note—Ecuador's currency is the U.S. dollar—to indicate how bad things have gotten. She ladles big scoops of basil and raspberry liquid into a dirty blender, cracking an egg into the mixture as the machine whirs. The food court wears an air of abandon: Half the stalls are empty, draped with thick, gray covers.

Maria Proveña runs a store on nearby Calle Cumanda. Cigarettes line the shelves behind the counter, toilet paper is available in bulk, and there is a long shelf carrying only booze. Proveña, now in her 70s, says she did business with the prison for most of her life. She had lucrative monthly deals with contractors who supplied Garcia Moreno. When it closed, her buyers never made good on their debts—totaling nearly $28,000.

"They owe us," Proveña says. "They owe the señora who sells cheese, the ladies down the road [who sell vegetables in bulk].... I have a huge folder of everything they bought and didn't pay for."

Perched on a wobbly stool behind the cash register, Proveña explains that the prison was good for more than just money in San Roque. "There is definitely more insecurity now. Before, there were always police cars. There were policemen everywhere," she explains. "Now, when there's a conflict, it takes an hour for the police to come. More people are selling drugs, right there in broad daylight."

A stroll through the market comes with offers of marijuana, cocaine, and pills from young men in puffy jackets. There are stories of people getting mugged on sunny Sunday mornings as crowds look on. A virtual force field of worried onlookers appears before foreigners, telling them to watch out, be careful, or simply turn around and go.