It’s hard to believe, but not quite four decades ago the Chinese settlement of Shenzhen was a modest fishing village, with a population of roughly 30,000. Today, thanks to a policy begun in 1979 that was designed to encourage foreign investment, that sleepy village is a manufacturing hub with a population of roughly 10 million. The success of Shenzhen is consistent with the broader development of China’s Pearl River Delta. Once mostly agricultural land, it has become, according to a recent World Bank report, the largest urban area in the world. The cities in the region have a combined population of about 57 million—larger than the populations of many countries, including Canada, Argentina, and South Africa.

The development of Shenzhen and the Pearl River Delta is a dramatic example of the global trend of urbanization. Now more than ever, we are living in an age when the health and fortune of billions are tied to the growth of cities. In 1800, just 3 percent of the world’s population lived in an urban area. Over the following two centuries, that proportion exploded, until, in 2008, it reached 50 percent. This striking demographic shift shows no signs of slowing down. The United Nations has projected that 66 percent of the world’s population will live in urban areas by 2050. This growth is expected to add 2.5 billion people to the global urban population by that time, with 90 percent of this increase occurring in Africa and Asia. Shaping economies, the environment and more, the effects of urbanization are tremendous and broad ranging.

This is no less true in the case of both our physical and mental health. From public hygiene, to the living and working conditions of urban residents, to exposure to infectious diseases, cities exert a profound influence on all aspects of our health. This has been the case since well before our present era. The growth of cities precipitated by the Industrial Revolution increased population density, crime and pollution, leading many literary and social commentators to write about the ways cities can shape the well-being of the people who live in them. Charles Dickens was particularly concerned with the unsanitary conditions of 19th century London, and the political polices that allowed for the creation of disease-spreading slums. In the United States, the reformer-journalist Upton Sinclair decried the worker exploitation and filthy factory environments that arose as a consequence of the industrialization of urban spaces.

The academic world has also been long preoccupied with how city life affects health, and the degree to which urban living influences the prevalence of diseases such as cancer, asthma, depression and overall rates of mortality. This concern is shared by the broader public health community. Earlier this year, Etienne Krug, director of the World Health Organization (WHO) Department for Management of Noncommunicable Diseases, Disability, Violence and Injury Prevention, cited rapid urbanization as a factor in the rise of obesity and diabetes in less developed countries. The WHO has also invested in urban health through its Healthy Cities program. Launched in 1986, the initiative’s stated aim is to “place health high on the agendas of decision makers and to promote comprehensive local strategies for health protection and sustainable development.”

Given the effect cities have historically had on the physical well-being of populations, it should come as no surprise that they also influence the workings of the brain. In 1939, Drs. Robert E. L. Faris and H. Warren Dunham theorized that some features of urban environments were linked with a higher rate of mental illness. They suggested that the social disorganization found in certain parts of cities could produce a sense of isolation in individuals, and lead to psychological distress. Subsequent research has compared the mental health of urban residents to that of their rural counterparts. A 2010 meta-analysis revealed marked differences between the two groups. Compared with rural areas, urban zones were associated with a 39 percent greater risk of mood disorders and a 21 percent greater risk of anxiety disorders.

Cites have also been linked with higher rates of post-traumatic stress disorder (PTSD). While U.S. crime rates have steadily declined, the concentration of violence in some urban neighborhoods has driven PTSD rates in those areas. The scope of the problem can be startling. When researchers began examining patients at Chicago’s Cook County Hospital, which treats nearly 2,000 patients a year for traumatic injuries like gunshots and stabbings, they found that over 40 percent of the patients they screened showed signs of PTSD.

There are several mechanisms through which cities, by their very design, can influence our mental health. For example, by keeping large numbers of people close together, cities make it easier for anxiety to spread through densely concentrated urban populations, almost like an infectious agent. The name for this is “social contagion.” While the cause of social contagion is the subject of debate, it may lie in our human tendency to observe and mimic the behavior of others. This phenomenon was present on a large scale after the September 11, 2001 terrorist attacks, when many New Yorkers who did not witness the horror firsthand nonetheless reported worries and anxieties much more commonly seen among people who experience violence and trauma themselves.

While cities tend to have more resources—hospitals, wealth, places to buy food—than rural areas, access to these resources is not evenly distributed among urban populations. Lack of access, combined with stressors like noise, crime and pollution, can strain urban residents, affecting mental health. These stressors do not emerge by chance. They are the result of powerful structural forces—like racism, education level, environmental pollutants and income inequality—that underlie the social, economic, and even physical character of cities. Together, they shape the conditions that create or curtail all aspects of health. Racist housing practices, for example, led to the residential segregation that concentrates crime in certain urban areas, to the detriment of both physical and mental health. And income inequality, particularly pronounced in cities, is a key driver of lifetime mental health for many low-resource households.

Given that more and more of us are living in cities, how do we go about building cities that can improve on, rather than detract from, our mental health? The solution lies in rethinking some of the structural conditions that shape all aspects of our urban life.  Last month, U.S. Housing and Urban Development Secretary Julián Castro unveiled a plan very much in line with this approach, proposing a regulation that would lower the permissible level of lead exposure in approximately 128,000 HUD-assisted units of housing in American cities. Lead exposure has been linked to depression and panic disorders, as well as other health conditions; tighter regulation and better monitoring of lead levels stand to help safeguard mental health.

HUD has also taken aim at residential segregation, recently releasing a new rule to bolster the often laxly enforced Fair Housing Act. Given what we know about the link between segregation and stress, changes at the level of policy have the potential to mitigate the effects of the unfair and harmful status quo.

With cities growing at such a rapid pace, we have a unique chance to design the landscape and political policies of urban spaces with well-being in mind—to an extent unprecedented in human history. The choices we make now will determine the trajectory of urban health for years to come. In Shenzhen, for example, mental health issues account for roughly 20 percent of the city’s overall disease burden, the highest rate of adult mental illness in any Chinese city. Much of this burden is driven by stigma, a problem the country has only recently begun to address with the enactment of a national mental health law—China’s first. The law was designed to bring psychiatric disorders out of the shadows through a range of reforms focused on better prevention and treatment, including the widespread distribution of information about mental illness “to create a community environment conducive to the well-being of residents,” in both urban and rural areas.

With one in five of its adult citizens suffering from a mental illness, Shenzhen stands to be a test case for this law. The degree to which the city, only a few decades old, prioritizes mental health—and pushes back against stigma—will have enormous implications for its vast and ever-growing population. This is true for rising cities around the world. Will the future of urbanization resemble the Dickensian past, where concern about well-being took a backseat to growth? Or will we seize this historical moment to build our urban spaces with an eye towards supporting the mental health of the population?