RIO DE JANEIRO (AP) — Nearly nine out of 10 Latin Americans will live in cities by the year 2050, and the region should use this moment of economic stability and slower population growth to make those cities more equitable, said a UN report issued Tuesday.

The report by the United Nations Human Settlements Programme said the region is already the world's most urbanized, with 80 percent of the population living in cities. This growth came at a cost: it was "traumatic and at times violent because of its speed, marked by the deterioration of the environment and above all, by a deep social inequality," the report said.

"The main challenge is how to develop in a way that curbs the enormous inequalities that exist within cities," said Erik Vittrup, the head of human settlements of UN-Habitat's regional office for Latin America and the Caribbean. "There are other cities that have been through these urban transformations and don't have this level of inequality. It goes against the economic model in Latin America. Cities didn't grow more inclusive; the prosperity wasn't for everyone."

Still, the region is poised for positive change, the survey found. The population growth of cities has slowed to just below 2 percent a year and the region's economy has stabilized after decades of high debt and inflation, making this a time to invest in needed infrastructure, housing and basic services, the report said.

"We're at the end of an era of urban explosion, with few exceptions," said Vittrup. "We're seeing a reduction in poverty, indigence in urban areas; unemployment is going down."

Overall, he said, Latin America is primed for "a new urban transition to quality of life, equity and sustainability."

Although the percentage of the population living in precarious conditions in urban shantytowns has gone down, the number of people living in such conditions has gone up to 111 million across the region. They are often segregated socially and spatially, with limited access to basic services, utilities, jobs and transportation.

"Until recently, public policies were focused on building new housing, instead of focusing on improving the quality of existing housing," Vittrup said.

There were also cases, as in Mexico, where new houses were built far from where they were needed in order to optimize the investors' financial gain, leaving 5 million empty houses in a country where millions live in sub-par conditions.

Another reason for concern is urban sprawl, said Vittrup. Although population growth in Latin America's cities has slowed, the cities continue to expand physically. This taxes the environment and makes governance more difficult, he said. It also increases the cost of energy and infrastructure by diminishing economies of scale and increasing gated communities and other forms of segregated housing.