It is hard to know with certainty where and why cities will falter and fail in the 21st century. It is even more difficult to predict which cities are going to thrive and survive. What is more certain is that unprecedented urbanization will play a defining role in their success or failure. To put it in crude terms: the fight for future security and development will be won or lost in the metropole.

The direction of city growth is pointing south and east. Most population growth in the coming decades will occur not in urban centers of North America and Western Europe, but in the sprawling cities and slums of Africa and Asia. Just three countries — China, India and Nigeria— will account for 40 percent of global growth over the next decade. People are not just moving to cities: cities are coming to them.

The speed and scale of the urban revolution is mesmerizing. Just 3 percent of the world’s population lived in cities in the early 1800s as compared to over 50 percent today. There are currently over 4,000 cities with more than 100,000 inhabitants around the world, home to over 4 billion people. Just 600 of them account for more than two thirds of global gross domestic product. Among the latter are 34 megacities, home to one-fifth of humanity.

Yet, the bulk of future urbanization will take place not in hyper- or megacities, but in small and medium-sized cities in low- and medium-income settings. The future geography of security and development will be marked by cities you’ve never heard of. What is more, the global slum population will expand from 1 billion to 2 billion people by 2040. There are tremendous opportunities in these fast-growing settings, but also unsettling risks.

Cities are re-emerging as critical referents in international relations. They have always served as the anchors of nation states and are once more exerting global governance, channeling ideas, capital and labor. Researchers from the London School of Economics, Manchester, MIT, United Nations University and the World Bank are busily trying to sort out what explains the onset, intensity and duration of insecurity in cities.

The global turn to the city is also captivating diplomats, development experts anddefense specialists. Digital and street-level protests are playing out in the central squares of Middle Eastern, North African, Central Asian and Latin American capitals and secondary cities. The freshly minted Sustainable Development Goals will depend, in part, on the fortunes of the world’s cities. Meanwhile, futurewar-fighting and humanitarian action are increasingly planned with cities in mind.

There are no simple solutions to guaranteeing security and safety in cities. The good news is that city living is typically correlated with longer life expectancy, improved health, higher education, and greater prosperity as compared to rural life. More worryingly, cities also commonly reproduce risks and stresses — both real and perceived. While expressing latent forms of resilience, living conditions in some of the world’s slums can be appalling.

Cities are exceedingly diverse and complex ecosystems. The fastest growing cities often lack centralized planning or evenly distributed services. In many cities of the “global south,” the lines dividing inner cities, suburbs, peripheries and slums are increasingly blurred. They can benefit a narrow bandwidth of elites while excluding others. Security is often expressed as a form of repression from above, or as resistance from below.

National and city authorities are in the business of imposing order. In ideal cases this is pursued as a means to an end — the securing of property rights, safety of citizens and the promotion of growth. But in many cities, order is an end in itself and fuels growth models benefiting the elite at the expense of the majority. Where cities are unable to provide even the most rudimentary core functions, including security, they are fragile. In such environments, alternative service providers — from gangs to vigilantes and private guards — emerge. The privatization of security in fragile cities is routine.

There is, of course, no such thing as a perfectly functional or completely failed city. All cities, irrespective of their location, exhibit properties of fragility and resilience. In this way, Baltimore and New Orleans share much in common with parts of Rio de Janeiro or Johannesburg.Fragility intensifies where risks and stresses accumulate, undermine services and expose citizens to chronic and acute vulnerability. Resilience emerges when formal and informal institutions cope and adapt to risks and stresses, and rebound to a new and improved equilibrium.

Cities do not exist in a vacuum: they are enmeshed in complex and multi-layered political and economic systems. Fragility and resilience are mediated by internal properties to cities, such as the extent of income and social inequality, youth unemployment, concentrated poverty, police and justice impunity and exposure to natural hazards. International factors also loom large, including a sudden influx of refugees, sudden price shocks, or the outbreak of conflict. Successful cities are those that are equipped to anticipate, plan for and respond to these risks.

Throughout it all, urban authorities are in a constant process of minimizing fragility and maximizing resilience. Just as the spectrum of threats they face is expanding, so too are the tools and methods available to address them. Many city leaders and societies are investing in urban upgrading, community-based models of policing, and new technologies to maximize transparency, participation and safety. In some instances these measures exacerbate insecurity, while in others they are credited with significantly reducing homicide, violent crime and fear.

Cities are increasingly central arbitrators of politics, economics and sustainable development. In upper-, medium- and lower-income settings, citizens are asserting their rights to the city and exploring new forms of networked cooperation and collaboration that transcend national borders. Cities from the so-called “global north” and “global south” are co-designing and experimenting with ways to address everything from climate change to the prevention and reduction of violence. It is only by learning from them and coming to terms with our many blind spots that cities will be made safer.

This article was prepared specifically in support of the Cities, Violence and Order project of the Institute for Development Studies at the University of Sussex, U.K.

Publication does not imply endorsement of views by the World Economic Forum.

To keep up with the Agenda subscribe to our weekly newsletter.

Author: Robert Muggah is currently supporting a United Nations University and World Bank initiative on fragile and resilient cities.