Most of the people who moved to London, New York City, Chicago, Berlin and other big cities during the 19th century traded away their health to make better wages. Crowding, unsafe drinking water, bad sanitation, harsh working conditions and industrial pollution made them sicker than their cousins back home in the countryside and shortened their life spans.

But starting in the middle decades of the 1800s, government reforms and urban leaders began turning the health of these cities around by investing in water, sanitation, waste removal, education and more. Today affluent cities are among the healthiest places to live. Even in many middle-income countries urban dwellers go about their lives largely unthreatened by the classic epidemics.

Yet the 800 million to 900 million people living in the informal settlements that make up modern-day slums still await such miracles. They suffer the effects of overcrowding, contaminated water and lack of affordable health care. In many of these places one in six children dies before the age of five, and life expectancies are less than half as long as those in the healthiest cities.

The situation will not get better until governments take greater responsibility for the wellness of the poorest residents. Governments are often a large part of the problem, however. Most of the poorest settlements are on land that is illegally occupied or subdivided, so urban bureaucracies may ignore their existence. In addition, formal laws and institutions tend to assume that people can afford to live in sanitary homes and therefore often do more to marginalize communities that are at the edge of subsistence than to help them. Governments may also shy away from engaging with activists who encourage impoverished residents to organize around demands for improvements, but these organizers must be engaged if government programs that are put in place can hope to succeed.

Bright spots exist, however. Some local governments are now acknowledging the informal settlements and are collaborating with the inhabitants to install the health infrastructure and services needed. One of the most effective initiatives is the secure housing program run by the government of Thailand’s Community Organizations Development Institute, which has supported hundreds of community-driven upgrading schemes, including paying for better water and sewage infrastructure and lending money to shack dwellers to improve their homes. Federations of slum dwellers are working with local authorities to change conditions in more than 15 other nations.

As these programs show, poor people’s health and their economic status both benefit most when governments, international agencies and slum dwellers work together to plan, implement and manage changes. More cities must see their “uncounted, unhealthy masses” as partners with resources and capacities if they want to complete a meaningful urban revolution.