This article was created in partnership with the National Geographic Society.

One evening in March, as a warm breeze blew in from the Indian Ocean and the call to prayer from the neighborhood mosque echoed in the twilight, Omari Abdullah sat on a plastic chair outside his home, preparing for his night’s work.

View Images The Mfugale overpass was built at the junction of the Mandela Expressway and Julius Nyerere Road to ease traffic for commuters. In Dar as in other rapidly growing African cities, congestion is a major problem. Photograph by Nichole Sobecki, National Geographic

Like many in this sprawling seaside metropolis, Abdullah is a migrant—a country boy drawn to life in the big city, who arrived 17 years ago and never looked back. A native of Kigoma, in western Tanzania, he couldn’t afford high school and grew restless with his job on a sunflower farm. So at 20 he made the 800-mile journey on the back of a truck, stayed with a friend until he could find work, and eventually started his own business: a small stand selling french fries—known as chips in this former British colony—on the outskirts of Tandale, one of the city’s largest informal settlements.

Scraping by here isn’t easy: Abdullah works seven days a week, often until 2 am, to make a profit that averages around $60 a month. But as he tells it, life is good.

View Images Omari Abdullah sits in his bedroom in Dar es Salaam. He moved there from Kigoma in northwestern Tanzania when he was 20 years old and now operates a french-fry stand. PHOTOGRAPH BY NICHOLE SOBECKI, NATIONAL GEOGRAPHIC

“You can build a life in Dar es Salaam if you’re willing to work hard,” he says in Kiswahili. His chips stand would never survive back home, he adds: “In places like Kigoma there isn’t any cash flow. That’s why so many people come here.”

Abdullah’s tale exemplifies a much larger story, one playing out in cities all across Africa. Africa today is the world’s least urbanized continent, with 43 percent of its population living in urban areas. But high birthrates and rising internal migration mean African cities are entering an era of unprecedented growth.

View Images Passengers disembark in the Kivukoni neighborhood of Dar es Salaam after crossing an inlet of the Indian Ocean on the ferry from Kigamboni—a southern district that has remained less developed in part because the ferry is the only way to get there. Photograph by Nichole Sobecki, National Geographic

According to U.N. projections, the continent will have 18 cities with more than five million people by 2030, up from eight in 2018. Today 21 of the world’s 30 fastest growing cities, including the top ten, are African. Dar es Salaam—currently Africa’s fifth most populous city—ranks second, behind Kampala in neighboring Uganda. It’s projected to grow from six million people today to 13.4 million by 2035, crossing the “megacity” threshhold of 10 million people sometime before 2030.

Done right, Africa’s urbanization holds a wealth of promise. Historically, the development of cities has been a key driver of economic development. The industrial revolution—which led to the dramatic rise in global living standards over the past 200 years—would never have been possible without cities. Public services like water, electricity, health, and education, are all cheaper and easier to provide there. Urban Tanzanians, as in most African countries, fare better in nearly all measures of human development than their rural counterparts.

A Megacity’s Rise With a population of more than six million, Dar es Salaam, Tanzania, is currently Africa’s fifth largest city. Africa will have 18 cities with more than five million people by 2030, up from eight in 2018, according to the United Nations. Metro areas with populations of more than five million people, by year 2018 2030 Alexandria Cairo Khartoum AFRICA Lagos TANZANIA Kinshasa Dar es Salaam Luanda Johannesburg 5 mi INDIAN OCEAN 5 km Tandale Built-up area Msimbazi R. DAR ES SALAAM Sprawling Seaside Metropolis The sprawling metropolis is projected to reach "megacity" status of 10 million people sometime before 2030 and to grow to 13.4 million people by 2035. Projected population of Dar es Salaam 15 million people 12 “Megacity” 10 million population 9 6 3 PROJECTED 0 2018 2020 2025 2030 2035 RYAN MORRIS, NGM STAFF. SOURCE: UNITED NATIONS WORLD URBANIZATION PROSPECTS, 2018 A Megacity’s Rise With a population of more than six million, Dar es Salaam, Tanzania, is currently Africa’s fifth largest city. Africa will have 18 cities with more than five million people by 2030, up from eight in 2018, according to the United Nations. Metro areas with populations of more than five million people, by year Population of Dar es Salaam 2018 2030 Alexandria 15 million people Cairo INDIAN OCEAN 13.4 million 5 mi Khartoum AFRICA 5 km 12 Projected Lagos TANZANIA Tandale Kinshasa Built-up area Dar es Salaam Msimbazi R. Luanda 9 DAR ES SALAAM Johannesburg 6.0 million 6 The sprawling metropolis is projected to reach "megacity" status of 10 million people sometime before 2030 and to grow to 13.4 million people by 2035. 3 83,844 0 1950 1960 1970 1980 1990 2000 2010 2020 2030 ’35 RYAN MORRIS, NGM STAFF. SOURCE: UNITED NATIONS WORLD URBANIZATION PROSPECTS, 2018

Until now, however, much of Africa’s urbanization has been what the development economist Paul Collier terms “dysfunctional,” characterized by insufficient infrastructure, a lack of formal jobs, and haphazardly built and often squalid slums. Lack of planning, weak regulations, and, in some countries, the difficulty of obtaining title deeds for land, leads cities to grow out rather than up, making commutes longer and more costly. That disconnects people and companies from jobs and markets, stifling the economy.

View Images Passengers wait to board the ferry for Kigamboni. Photograph by Nichole Sobecki, National Geographic

Dar es Salaam is a case in point. More than three-quarters of residents live in informal settlements like Tandale, a vast, labyrinthine neighborhood of flimsily built concrete houses, where children play near open sewers and flooding nearly every rainy season leads to outbreaks of diarrhea and cholera. Dar’s growth until today has largely been organic, with neighborhoods sprouting along major transport corridors that extend like swollen fingers from the central business district, where most economic activity takes place.

Increasingly, however, Tanzanian authorities, development partners, and residents themselves are realizing they must do better if they want a city that’s less congested, more resilient to environmental threats, and better positioned to deliver the prosperity sought by Abdullah and millions like him. As it careens toward megacity status, experts say, Dar is at a critical juncture—with the choices it makes now, from grassroots initiatives to policies at the highest levels of government, set to determine the city’s path for generations.

“Dar es Salaam has one chance to urbanize right,” says Andre Bald, an urban planner and program leader for sustainable development at the World Bank in Tanzania. “Once a city hits ten million people, its trajectory is hard to change. At that stage, it’s very difficult to claw yourself back and do things better.”

A ruler who didn’t like cities

If Majid bin Said could see Dar es Salaam today, he’d likely be as wide-eyed as Abdullah when he first arrived here from the countryside. As Sultan of Zanzibar, Majid established Dar in 1862 as a plantation town to support his nearby archipelago, which had long been a hub of Indian Ocean commerce. Endowed with a large natural harbor—bandar-as-salaam means “harbor of peace” in Arabic—the new city soon developed a life of its own. It grew rapidly during periods of German and British colonial rule. By 1964 it was the capital and largest city of an independent Tanzania.

Julius Nyerere, Tanzania’s first president, tried to throttle it; he viewed cities as dens of decadence that consumed the wealth of the countryside. Inspired in part by Maoist China, his government resettled millions of people into planned villages, shifted the capital to Dodoma, then a small town in the hinterlands, and partitioned Dar es Salaam into three municipalities. James Brennan, a professor of history at the University of Illinois who specializes in Tanzania, says these acts were meant to “weaken urban power and provide obstacles against further urban investment.”

Nyerere succeeded—but people kept coming to Dar anyway. By the 1980s, Tanzania’s economy was failing, and the poverty spawned by Nyerere’s collectivist schemes only hastened the urban influx. Arriving in a city with little planning and limited formal housing, migrants were forced to improvise. The city has grown “haphazardly” ever since, says Hellenic Mpetula, principal urban planner in the Ministry of Lands, Housing, and Human Settlements Development.

“When people come to Dar es Salaam, they look for a piece of land and they just start building,” she says. “The control machinery is so weak. If someone comes and builds, even if it’s in a flood-prone area, no one will tell them they must stop.”

The best-laid plans

Mpetula, who joined the ministry in 1987, has witnessed Dar es Salaam change dramatically—though not quite in the way she’d envisioned. Her office, a jumble of paper renderings, 3D models, and boxes filled with planning documents past and present, is a living museum of the many ideas that have sought to give the city more direction. Implementation has always proven difficult, she says. A 2012-2032 Dar es Salaam master plan, for example, envisions the creation of five satellite cities designed to decongest the urban core and bring jobs and services closer to the people. Yet seven years after it was drafted, it hasn’t been approved, and copies gather dust in an alcove just outside her office.

View Images Another new housing project, Gezaulole Residence, is further along than Kawe 711 and is meant to provide affordable housing primarily for public servants. An apartment of just under 400 square feet is being offered for just under $20,000; a 960-square-foot home goes for around $42,000. The project is in Kigamboni, about ten miles south of the ferry to the city center. Photograph by Nichole Sobecki, National Geographic

Mpetula and her colleagues face two familiar impediments: money and politics. Like most countries in sub-Saharan Africa, Tanzania is urbanizing while still poor. According to the World Bank, the region reached a rate of 40 percent urbanization at a GDP per-capita of approximately $1,000. East Asia, by contrast, did so in the 1990s at a GDP per-capita of $3,600. Smaller economies mean less money for investments in housing and infrastructure.

Moreover, while most East Asian cities grew alongside a manufacturing boom that created jobs, African industry remains stunted. According to government statistics, Tanzania, with a population of 60 million, had just 2.6 million formal jobs in 2016. More than half of those workers earned less than the equivalent of $213 dollars per month—hardly enough to afford a formal house, particularly as mortgage rates run 15 to 19 percent. The Center for Affordable Housing in Africa, a Johannesburg-based NGO, estimates that only 2.5 percent of urban Tanzanian households can afford the roughly $16,000 needed for the cheapest formally built home.

Dar’s planners also have to navigate overlapping and at times conflicting institutions. The legacy of Nyerere’s efforts to undermine the city remains: Today, it is divided into five municipalities, which share authority with a city-wide mayor and city council, as well as with a regional commissioner, appointed by the president, who oversees local administration on behalf of the central government.

Central control

View Images Apartment blocks and commericial buildings butt up against each other in central Dar es Salaam. Tanzania's current housing shortage is estimated at three million units and increasing by 200,000 units a year. Photograph by Nichole Sobecki, National Geographic

Under the populist President John Magufuli, who assumed office in 2015, centralized control over Dar and other cities has tightened—in part, some critics say, to rein in local leaders who are often members of the opposition. Property taxes and other streams of revenue that used to be collected by local authorities are now channeled through Dodoma, adding an additional layer of bureaucracy and further distancing citizens from the planning process.

Magufuli, like Nyerere before him, has focused on development outside of Dar, shifting thousands of government jobs to Dodoma, and prioritizing rural roads and a high-speed railway from Dar to the capital that will eventually reach neighboring Rwanda. He has also curtailed projects seen as wasteful or unviable, as part of a wider campaign against corruption.

View Images Gezaulole Residence in Kigamboni also offers single-family homes. Photograph by Nichole Sobecki, National Geographic

Among them is perhaps the city’s most ambitious housing project: Dege Eco Village, a high-end 7,000-unit estate developed by the national pension fund that promised to “re-define Dar es Salaam.” An audit mid-construction found gross irregularities and determined it was “not serving the public interest.” The site is now a sprawling concrete ghost town.

Other seemingly more viable projects have faced delays as well. North of the city center, the concrete shells of eight 21-story towers, known as Kawe 711, sit half-built on a stretch of prime oceanfront property. The project, developed by the state-owned National Housing Corporation (NHC), is meant to kick-start development of a 50,000 resident satellite city—one of five envisioned in the draft 2012 master plan. But the government has yet to guarantee the loans needed to finish the buildings’ construction.

Some believe Magufuli is reluctant to authorize the completion of a high-end project like this when demand for affordable housing is so acute. Yet Felix Maagi, NHC’s Director of Finance, says the corporation uses returns from its upmarket developments to subsidize lower-priced units, which are generally less profitable. He insists Kawe will still move forward. It will eventually include homes for a mix of income levels, he says.

Renewal and resilience

View Images A BRT bus zooms past a sidewalk market in downtown Dar. Photograph by Nichole Sobecki, National Geographic

Dar’s grandest plans may frequently face roadblocks, but the city has still made considerable progress. Over the last decade, towers of blue-tinged glass have transformed its downtown skyline; excluding South Africa, the city is now home to four of the ten tallest buildings in sub-Saharan Africa. Over time, investments driven by rising property values and the upgrading of some informal settlements have helped revitalize some of its poorest neighborhoods.

Commuters who used to spend hours each day stuck in traffic, often in sweltering minibuses, now have an alternative: The first line of a modern bus rapid transit (BRT) system was launched in 2016 with 29 stations, including 20 along a seven-mile stretch of Morogoro Road, one of the city’s main east-west arteries. Construction of a second line is expected to begin this year, with plans to scale up to six lines and 228 stations by 2035.

It hasn’t gone off without hitches; riders say there aren’t enough buses, leading to crowing and delays, and fares are still considered high. But it helped Dar win the global Sustainable Transport Award in 2018 and has also spawned new clusters of offices, businesses, and apartments, helping the city densify in a manner that better links people to jobs and industry to markets.

Tanzanian leaders and their partners are increasingly tackling the city’s greatest environmental challenge: flooding. Dar’s low-lying coastal geography and the polluted Msimbazi River, which slices through its urban core, make it among the most vulnerable cities in Africa. Residents die nearly every year in floods that are only getting worse as climate change increases torrential rains and as the spread of pavement in the sprawling city increases runoff. According to Shahidi wa Maji, a civil society group, nearly a quarter million people along the Msimbazi face serious health risks linked to the river’s “toxic mixture of industrial effluent, chemicals, abattoir waste and human sewage.” It all seeps into homes and drinking water, particularly during floods.

View Images Friends relax in the shade of a sea wall on a beach in Dar es Salaam. Sea walls are one of the most visible ways this fast-growing city is trying to adapt to a fast-changing climate. Photograph by Nichole Sobecki, National Geographic

In 2018, with financing from the U.N., authorities constructed a seawall along Barack Obama Drive, which was being eroded by coastal flooding. With support from the World Bank and the United Kingdom, the Tanzanian government is coordinating the creation of flood zone maps and emergency response plans for Dar, and it’s considering an ambitious proposal to redevelop the flood-prone lower Msimbazi basin.

The plan, developed during an eight-month collaborative process involving 14 national agencies, two of Dar’s five municipalities, 17 city sub-wards, and hundreds of local residents, would entail the widening and excavation of the riverbed, the establishment of a city park, and the creation of terraces to better manage flooding and open up new land for development. If implemented, its proponents say, it would transform one of Dar es Salaam’s greatest liabilities into a vector of regeneration—and represent a major step toward citywide resilience.

A little cushion

The quest for resilience is an individual matter as well. Over the past 17 years, Omari Abdullah has gradually climbed the ladder of the city’s informal economy. Initially he sold water to motorists stuck in traffic. Later, he got into the chips business by first peeling potatoes for a friend. Along the way he married and had a daughter. In his early years he lived in a house that often flooded. Today, the room he rents for $15 a month is perched on ground just high enough that he doesn’t have to worry when it rains.

View Images Students walk towards a BRT station in the Manzese ward of Dar es Salaam. The city hopes to dramatically expand the BRT network in the coming years. Photograph by Nichole Sobecki, National Geographic

One evening on my way to visit him I walk a stretch of Morogoro Road, the busy thoroughfare. I pass shops selling sofas, cell phone credit, and colorful fabrics; roadside vendors offering jackfruit in plastic cups and juice pressed from stalks of sugar cane. Young men lounge atop motorcycle taxis. Others crowd outside betting houses, tracking soccer matches in faraway cities. The humid air smells like grilled meat, burning trash, and ocean. An occasional pub blares Tanzanian rumba, the music of old-timers, or the homegrown, hip-hop-inspired Bongo Flava of the youth.

Much of this city may still lack proper roads and sewers, but it does not lack life. As more lives pour into it by the millions, keeping it vibrant, the question is whether Dar can keep giving them economic opportunity—and also whether the city’s stewards can plan a more efficient, better connected, and denser metropolitan area. It will take major investments in housing—the NHC says Tanzania faces an urban deficit that grows by 200,000 units a year, many of them in Dar—and a deepening of the mortgage market to make home borrowing more affordable. It will mean the continued extension of mass transit and the creation of new hubs like Kawe Satellite City to diversify commutes and de-stress the city center.

Above all, says the World Bank’s Bald, building a better Dar will take nimble metropolitan institutions that can adapt to city-wide challenges, while harnessing ideas that bubble up from the ground and the energy of new arrivals like Abdullah.

Finally I reach the roadside stand where he fries chips on a charcoal grill that glows a deep red in the moonlight. I ask him whether coming here, and hustling for so many years, has been worth it.

He smiles and flexes his biceps. “When I arrived I was so thin,” he says. Now, at 37, he’s got a noticeable paunch—a sign, for someone of his background, that he’s made it.