IT HAS been a week since Mohammed Sani moved to Lagos, Nigeria’s commercial capital. A scrawny 22-year old from Kebbi State in the north-west, he came looking for work. He has certainly found it. At 5am each morning he fills ten 25-litre plastic jugs with water from a borehole, paying 20 naira for each one (about $0.05). He then pulls them around Yaba, his new neighbourhood, on a cart, selling each one for 25 naira. By sunset at 7pm he has perhaps 700 naira of profit ($2) in his pocket—not much in Lagos. “If I find a better business, I will try it,” he says. But for the moment, this is as good at it gets.

Young people migrate to cities the world over looking for opportunity. Lagos, a sprawling lagoon city of some 21m people (pictured), is no exception. In dense traffic jams, young men weave through the cars selling plastic pouches of drinking water and tissues. On street corners they run generators and will charge your phone or photocopy a document. But most people never get much further than where they start: working extraordinarily hard for very little. Migrants to African cities are not worse off than they were in the countryside. If that were the case, they would move back. But urbanisation in Africa does not provide nearly as good a ladder out of poverty as it does elsewhere.

Africa is the world’s fastest urbanising continent. In 1950, sub-Saharan Africa had no cities with populations of more than 1m. Today, it has around 50. By 2030, over half of the continent’s population will live in cities, up from around a third now. The fastest growing metropolises, such as Nairobi, Kenya’s capital, are expanding at rates of more than 4% per year. That is almost twice as fast as Houston, America’s fastest-growing metropolis.

In most parts of the world, crowding people together allows businesses that wouldn’t otherwise exist to thrive. In Africa this process seems not to work as well. According to one 2007 study of 90 developing countries, Africa is the only region where urbanisation is not correlated with poverty reduction. The World Bank says that African cities “cannot be characterised as economically dense, connected, and liveable. Instead, they are crowded, disconnected, and costly.”

Not all African cities are the same, of course. Kigali, Rwanda’s capital, is amazingly clean—the result of having a stern disciplinarian as a president. South Africa’s big cities somewhat resemble American ones, only with shanty towns at the edges. What ties them together, and sets them apart from cities elsewhere in the world, according to the Brookings Institution, an American think-tank, is that urbanisation has not been driven by increasing agricultural productivity or by industrialisation. Instead, African cities are centres of consumption, where the rents extracted from natural resources are spent by the rich. This means that they have grown while failing to install the infrastructure that makes cities elsewhere work.

In Lagos, the island of Ikoyi, which was once a garden suburb for British colonial officers, is now a wealthy residential area lived in by oil executives and politicians, with a golf course. But if you want to live here, you must “bring your own infrastructure”, jokes Giles Omezi, a Nigerian architect. Every private home or apartment block has not only its own security guards and generator, but its own borehole and water treatment system too. Even street lighting and roads can be privately provided: a thriving business in Lagos is reclaiming land on which to build fancy gated communities. The biggest of them, Eko Atlantic, is being built by a Lebanese family business, and stretches way out into the Atlantic Ocean.

The poor new arrivals, meanwhile, get by with almost nothing. Underneath a bridge that connects the Nigerian mainland to Lagos’s islands, the slum of Makoko sprawls out into the lagoon—the houses at the edge are built on stilts in the water on foundations of rubbish. Once a fishing village, it is now home to anywhere between 80,000 and 300,000 people from all over west Africa. Water has to be brought in by cart. Sewage runs in the narrow streets. The police, when they come in at all, do so mostly to demand bribes. “The government doesn’t want us to be here,” says Isaac Dosugam, a resident who works as a driver. In 2012 part of the slum was indeed demolished by the authorities. But it has grown back since.

In Dar es Salaam, Tanzania’s commercial capital, 28% of residents live at least three to a room; in Abidjan, Ivory Coast’s economic hub, the figure is 50%. In Nairobi, around two-thirds of the population occupy 6% of the land. Slums bring with them filth and disease. Across sub-Saharan Africa, only 40% of urban residents have access to proper toilets—a figure that has not changed since 1990.

Formal jobs are rare. Most slum dwellers scrape by on informal work in their neighbourhoods. Those who can find jobs with salaries usually have long commutes to distant city centres. In Nairobi, the primary means of transport is on foot. In South Africa the average commute by bus is 74 minutes each way.

The unequal distribution of land doesn’t just create slums: it also raises costs for businesses. In Lagos, expat tenants of new apartment blocks are typically expected to pay an entire year’s rent in advance. For a modest three-bedroom apartment on Ikoyi, this might come to $65,000. And yet the city is littered with empty and half-finished buildings, even in the most fashionable districts. Much of it is government-owned: office blocks abandoned since Nigeria moved the capital from Lagos to Abuja in 1991. But privately owned land is often underdeveloped too, partly thanks to a law which requires any sale to have the governor’s consent.

There is some progress. Traffic in Lagos is no longer as punishing as it once was, largely thanks to new roads built by Babatunde Fashola, the city’s previous governor. A light-rail system—expensive, long delayed and badly planned—is almost complete. When it opens, Lagos will join Addis Ababa, Ethiopia’s capital, which opened the first sub-Saharan metro system outside of South Africa last year. In cities such as Abidjan and Kampala expressways funded by tolls are easing bottlenecks and opening up agricultural land to developers, fuelling suburban construction booms.

But the trouble is that changes often seem to benefit the relatively rich most. Better roads typically do not reach into slums; new apartments are never targeted at people earning a few dollars a day. Politicians across Africa often seem to see the poor as a problem to be swept away, rather than people whose lives need improving. In Lagos, the state government frequently bulldozes slums, but almost never provides alternative housing. In Kigali, according to Human Rights Watch, a lobby group, unsightly street traders are often beaten up and imprisoned without trial.

Real change is possible, but politically hard. If Africa’s wealthy paid more taxes, the extra cash could pay for infrastructure that would eventually benefit everybody. Clearer land registration would lower the cost and risk of building new homes. Devolution that made city leaders more accountable might produce planning policies that help the poor. Some of these reforms are being tried in a few African cities, but rarely all at once.

So most African city dwellers have to rely on their own hard work and enterprise. In his tiny shop on the Lagos mainland, Colin Alli is one of the luckier ones. He explains how he built up his bedsheets business from a single market stall. Now he employs four men. “Tomorrow I can be governor,” he jokes.