MEXICABLE, a cable-car line 4.9km (three miles) long, soars above Ecatepec, a poor suburb of Mexico City. Open for just over a year, its 185 gondolas carry 18,000 people a day between San Andrés de La Cañada, at the top of the hill, and Santa Clara Coatitla at the bottom. The trip makes five stops en route and takes 19 minutes, compared with the 80-minute bus trip residents previously endured. The cable car is “super quick and much less stressful,” says Nelly Hernández, a passenger accompanied by her awestruck four-year-old daughter.

In rich Western countries, cable cars are mainly for tourists. Latin America, in contrast, has adopted them as mass transit for the poor. They suit the region’s mountainous cities, many of which have expanded chaotically, says Julio Dávila of University College London. Ecatepec’s population jumped after an earthquake hit Mexico City in 1985.

The pioneer was Medellín, Colombia’s second city. Refugees from the country’s long civil war had crowded into hillside districts. Widening streets to create new bus lanes or extending the metro would have been too costly. A cable car, opened in 2004, was the answer. Since then Cali, Caracas and Rio de Janeiro (as well as Mexico City) have built similar systems. In September Evo Morales, Bolivia’s president, opened La Paz’s fifth teleférico, extending the world’s longest and highest network with a link to the clifftop city of El Alto.

One reason cable cars are popular is that governments usually subsidise them in order to compete with private buses. Mexicable charges seven pesos (37 cents), less than half of its break-even price. Politicians like them because they can be built without displacing large groups of people; it often takes 18 months or less, in time for re-election. “Mayors think, ‘I’m going to be cutting the ribbon’,” says Mr Dávila.

The jury is out on whether cable cars are worth the cost. In 2012 Mr Dávila and others conducted a study of Medellín’s system, which found that crime fell and jobs grew in areas the cars served. However, the city also made investments in policing and economic development at the same time, which may have been responsible for these gains. The researchers did find that the cable car made residents prouder of their community. People in Ecatepec feel the same way. Bandits go after buses but leave the cable cars alone, says David Ramírez, a passenger. The gondolas’ cosy interiors include two facing metal benches, encouraging conversation.

Residents of Complexo de Alemão, a shantytown in Rio de Janeiro, have no such cause for cheer. Rio’s state government paid 253m reais ($135m) to a consortium led by Odebrecht, a construction company, to build a cable car connecting the area to the city’s metro. That now looks ill-advised. In a plea bargain, the former head of Odebrecht’s infrastructure arm said it had paid 94m reais in bribes and donations to the state’s former governor, who was later convicted on corruption charges, to win a development deal that included the federally-funded cable-car project. For five years, residents rode the gondolas free of charge. But they have been grounded since September 2016, after the state stopped paying the firm that ran them.

Despite the Rio fiasco, Latin American cities are still cabling up. Bogotá, Colombia’s capital, will open its first commuter cable car next year. The state of Mexico, which borders Mexico City, intends to build two new lines by 2023. In all, 20 projects are planned in the region. The sky, it seems, is the limit.