“São Paulo means a great thing to me: opportunity,” he said.

An array of similar ventures started by immigrants is flourishing amid the grit of São Paulo’s old center, reflecting shifts in global immigration patterns. Reinforcing São Paulo’s status as Brazil’s premier global city, Asians, largely from China, Africans and Spanish-speaking Latin Americans are flowing in.

São Paulo, South America’s largest city, with a metropolitan population approaching 20 million, officially has about 368,000 foreigners. But as Brazil’s improved living standards gain notice in poorer countries, the city is experiencing a surge in arrivals of undocumented immigrants. While estimates vary widely, authorities figure that immigrants actually number around 600,000, far fewer than in a place like New York — which counts more than three million foreign-born residents — but considerably more than any other Brazilian city.

At the street level, this influx is injecting vitality into a downtown area that had come in recent decades to epitomize the abandonment and degradation of big sections of São Paulo.

“Sometimes I still need to step over the crack addicts to open the door to my restaurant,” Edgard Villar, 36, a Quechua-speaking Peruvian immigrant whose restaurant, Rinconcito Peruano, on the second floor of an unmarked building, lures tattooed hipsters from more prosperous parts of the city. “But that’s O.K., since getting here is part of the thrill for our clientele.”

Navigating old São Paulo’s streets and alleyways did not always involve such thrills.

For centuries after Jesuits founded São Paulo in 1554, the life of the upper classes in the city revolved around the old center, where the initial landmarks of the city’s downtown emerged, including the stock exchange and modernist skyscrapers. Immigrants, largely from Italy, Portugal, Spain and the Middle East, flooded into the area at the end of the 19th and the start of the 20th centuries.