The Third Mainland Bridge is a looping ribbon of concrete that connects Lagos Island to the continent of Africa. It was built in the nineteen-seventies, part of a vast network of bridges, cloverleafs, and expressways intended to transform the districts and islands of this Nigerian city—then comprising three million people—into an efficient modern metropolis. As the bridge snakes over sunken piers just above the waters of Lagos Lagoon, it passes a floating slum: thousands of wooden houses, perched on stilts a few feet above their own bobbing refuse, with rust-colored iron roofs wreathed in the haze from thousands of cooking fires. Fishermen and market women paddle dugout canoes on water as black and viscous as an oil slick. The bridge then passes the sawmill district, where rain-forest logs—sent across from the far shore, thirty miles to the east—form a floating mass by the piers. Smoldering hills of sawdust landfill send white smoke across the bridge, which mixes with diesel exhaust from the traffic. Beyond the sawmills, the old waterfront markets, the fishermen’s shanties, the blackened façades of high-rise housing projects, and the half-abandoned skyscrapers of downtown Lagos Island loom under a low, dirty sky. Around the city, garbage dumps steam with the combustion of natural gases, and auto yards glow with fires from fuel spills. All of Lagos seems to be burning.

The bridge descends into Lagos Island and a pandemonium of venders’ stalls crammed with spare parts, locks, hard hats, chains, screws, charcoal, detergent, and DVDs. On a recent afternoon, car horns, shouting voices, and radio music mingled with the snarling engines of motorcycle taxis stalled in traffic and the roar of an air compressor in an oily tire-repair yard. Two months earlier, a huge cast-iron water main suspended beneath the bridge had broken free of its rusted clip, crushing a vacant scrap market below and cutting off clean water from tens of thousands of the fifteen million people who now live in Lagos.

In the absence of piped water, wealthier residents of the waterfront slum at the end of the bridge, called Isale Eko, pay private contractors to sink boreholes sixty feet deep. All day and night, residents line up at the boreholes to pay five cents and fill their plastic buckets with contaminated water, which some of them drink anyway. Isale Eko is the oldest and densest part of Lagos Island. Every square foot is claimed by someone—for selling, for washing, even for sleeping—and there is almost no privacy. Many residents sleep outdoors. A young man sitting in an alley pointed to some concrete ledges three feet above a gutter. “These are beds,” he said.

In the newer slums on the mainland, such as Mushin, rectangular concrete-block houses squeeze seven or eight people into a single, mosquito-infested room—in bunks or on the floor—along a narrow corridor of opposing chambers. This arrangement is known as “face me I face you.” One compound can contain eighty people. In Mushin, Muslim Hausas from the north of Nigeria coexist uneasily with mostly Christian Yorubas from the south. Armed gangs represent the interests of both groups. On the night of Febru-ary 2, 2002, a witness told me, a Hausa youth saw a Yoruba youth squatting over a gutter on the street and demanded, “Why are you shitting there?” In a city where only 0.4 per cent of the inhabitants have a toilet connected to a sewer system, it was more of a provocation than a serious question. The incident that night led to a brawl. Almost immediately, the surrounding compounds emptied out, and the streets filled with Yorubas and Hausas armed with machetes and guns. The fighting lasted four days and was ended only by the military occupation of Mushin. By then, more than a hundred residents had been killed, thousands had fled the area, and hundreds of houses had burned down.

Newcomers to the city are not greeted with the words “Welcome to Lagos.” They are told, “This is Lagos”—an ominous statement of fact. Olisa Izeobi, a worker in one of the sawmills along the lagoon, said, “We understand this as ‘Nobody will care for you, and you have to struggle to survive.’ ” It is the singular truth awaiting the six hundred thousand people who pour into Lagos from West Africa every year. Their lungs will burn with smoke and exhaust; their eyes will sting; their skin will turn charcoal gray. And hardly any of them will ever leave.

Immigrants come to Lagos with the thinnest margin of support, dependent on a local relative or contact whose assistance usually lasts less than twenty-four hours. A girl from the Ibo country, in the southeast, said that she had been told by a woman in her home town that she would get restaurant work in Lagos. Upon arrival, she discovered that she owed the woman more than two hundred dollars for transport and that the restaurant job didn’t exist. The girl, her hair combed straight back and her soft face fixed in a faraway stare, told me that she was eighteen, but she looked fifteen. She is now a prostitute in a small hotel called Happiness. Working seven nights a week, with each customer spending three and a half dollars and staying five minutes, she had paid off her debt after seven months. She has no friends except the other girls in the hotel. In her room, on the third floor, the words “I am covered by the blood of Jesus. Amen” are chalked on a wall three times.

A woman named Safrat Yinusa left behind her husband and two of her children in Ilorin, north of the city, and found work in one of Lagos’s huge markets as a porter, carrying loads of produce on her head. She was nursing a baby boy, whom she carried as she worked. She paid twenty cents a night for sleeping space on the floor of a room with forty other women porters. In two months, she had saved less than four dollars. Considering that the price of rice in Lagos is thirty-three cents per pound, it is hard to understand how people like Yinusa stay alive. The paradox has been called the “wage puzzle.”

When Michael Chinedu, an Ibo, arrived in Lagos, he knew no one. On his first day, he saw a man smoking marijuana—in Lagos, it’s called India hemp—and, being a smoker as well, introduced himself. On this slim connection, Chinedu asked the man if he knew of any jobs, and he was taken to the sawmill, where he began at once, working long days amid the scream of the ripsaw and burning clouds of sawdust, sleeping outside at night on a stack of hardwood planks. After three months, he had saved enough for a room. “If you sit down, you will die of hunger,” he said.

The hustle never stops in Lagos. Informal transactions make up at least sixty per cent of economic activity; at stoplights and on highways, crowds of boys as young as eight hawk everything from cell phones to fire extinguishers. Begging is rare. In many African cities, there is an oppressive atmosphere of people lying about in the middle of the day, of idleness sinking into despair. In Lagos, everyone is a striver. I once saw a woman navigating across several lanes of traffic with her small boy in tow, and the expression on her face was one I came to think of as typically Lagosian: a look hard, closed, and unsmiling, yet quick and shrewd, taking in everything, ready to ward off an obstacle or seize a chance.

In 1950, fewer than three hundred thousand people lived in Lagos. In the second half of the twentieth century, the city grew at a rate of more than six per cent annually. It is currently the sixth-largest city in the world, and it is growing faster than any of the world’s other megacities (the term used by the United Nations Center for Human Settlements for “urban agglomerations” with more than ten million people). By 2015, it is projected, Lagos will rank third, behind Tokyo and Bombay, with twenty-three million inhabitants.

When I first went to Lagos, in 1983, it already had a fearsome reputation among Westerners and Africans alike. Many potential visitors were kept away simply by the prospect of getting through the airport, with its official shakedowns and swarming touts. Once you made it into the city, a gantlet of armed robbers, con men, corrupt policemen, and homi-cidal bus drivers awaited you.

Recently, Lagos has begun to acquire a new image. In the early years of the twenty-first century, the Third World’s megacities have become the focus of intense scholarly interest, in books such as Mike Davis’s “Planet of Slums,” Suketu Mehta’s “Maximum City,” and Robert Neuwirth’s “Shadow Cities.” Neuwirth, having lived for two years in slum neighborhoods of Rio de Janeiro, Nairobi, and other cities, came to see the world’s urban squatters as pioneers and patriots, creating solid communities without official approval from the state or the market. “Today, the world’s squatters are demonstrating a new way forward in the fight to create a more equitable globe,” he wrote. What squatters need most of all, he argued, is the right to stay where they are: “Without any laws to support them, they are making their improper, illegal communities grow and prosper.”

Stewart Brand, the founder of the Whole Earth Catalog and a business strategist based in Marin County, California, goes even further. “Squatter cities are vibrant,” he writes in a recent article on megacities. “Each narrow street is one long bustling market.” He sees in the explosive growth of “aspirational shantytowns” a cure for Third World poverty and an extraordinary profit-making opportunity. “How does all this relate to businesspeople in the developed world?” Brand asks. “One-fourth of humanity trying new things in new cities is a lot of potential customers, collaborators, and competitors.”

In the dirty gray light of Lagos, however, Neuwirth’s portrait of heroic builders of the cities of tomorrow seems a bit romantic, and Brand’s vision of a global city of interconnected entrepreneurs seems perverse. The vibrancy of the squatters in Lagos is the furious activity of people who live in a globalized economy and have no safety net and virtually no hope of moving upward.

Around a billion people—almost half of the developing world’s urban population—live in slums. The United Nations Human Settlements Program, in a 2003 report titled “The Challenge of the Slums,” declared, “The urban poor are trapped in an informal and ‘illegal’ world—in slums that are not reflected on maps, where waste is not collected, where taxes are not paid, and where public services are not provided. Officially, they do not exist.” According to the report, “Over the course of the next two decades, the global urban population will double, from 2.5 to 5 billion. Almost all of this increase will be in developing countries.”

In 2000, the United Nations established the Millennium Development Goals. One of them is to improve the lives of a hundred million slum dwellers by 2020, in terms of shelter, water, sewers, jobs, and governance. This will require enormous expenditures of money and effort, but even if the goal is achieved nearly a quarter of the world’s population—more than two billion people—will still be living in conditions like those in Lagos.

To some Western intellectuals, La-gos has become the archetype of the megacity—perhaps because its growth has been so explosive, and perhaps because its cityscape has become so apocalyptic. It has attracted the attention of leading writers and artists, who have mounted international exhibitions in London and Berlin. All this interest has somehow transformed Lagos into a hip icon of the latest global trends, the much studied megalopolis of the future, like London and Paris in the nineteenth century or New York and Tokyo in the twentieth. For several years, the Dutch architect and urban theorist Rem Koolhaas has been working with his students at the Harvard Graduate School of Design on a project to study the future of cities; he has gone to Lagos four times and produced several articles as well as a book to be published early next year, “Lagos: How It Works.” Koolhaas once described Lagos to an interviewer as a protean organism that creatively defies constrictive Western ideas of urban order. “What is now fascinating is how, with some level of self-organization, there is a strange combination of extreme underdevelopment and development,” he said. “And what particularly amazes me is how the kinds of infrastructure of modernity in the city trigger off all sorts of unpredictable improvised conditions, so that there is a kind of mutual dependency that I’ve never seen anywhere else.” With its massive traffic jams creating instant markets on roads and highways, Lagos is not “a kind of backward situation,” Koolhaas said, but, rather, “an announcement of the future.”

As a picture of the urban future, Lagos is fascinating only if you’re able to leave it. After just a few days in the city’s slums, it is hard to maintain Koolhaas’s intellectual excitement. What he calls “self-organization” is simply collective adaptation to extreme hardship. Traffic pileups lead to “improvised conditions” because there is no other way for most people in Lagos to scratch out a living than to sell on the street. It would be preferable to have some respite from buying and selling, some separation between private and public life. It would be preferable not to have five-hour “go-slows”—traffic jams—that force many workers to get up well before dawn and spend almost no waking hours at home. And it would be preferable not to have an economy in which millions of people have to invent marginal forms of employment because there are so few jobs.

I asked Paul Okunlola, an editor at the Nigerian newspaper the Guardian, why people kept coming to Lagos, when there seemed so little chance of getting ahead. “They never believe there’s no chance,” he said. Okunlola described the largest market in Lagos: the Mile 12, on the highway heading north out of town, where foodstuff coming into the city is bought and sold wholesale. It is a muddy area—much of Lagos is reclaimed swampland—and workers with buckets of water earn seven cents washing the feet of market women. “That is the kind of entrepreneurship that keeps a lot of people in Lagos,” Okunlola said. “If you took that to my home town, who would wash feet—and who would pay money for it, anyway? That is what drives Lagos.”

Folarin Gbadebo-Smith, the chairman of a district on Lagos Island, said that globalization, in the form of mass media, attracts Nigerians to Lagos as a substitute for New York or London. A distorted picture then flows back to the village. “Come Christmas, everybody in Lagos—the successful and the unsuccessful—packs their bags and goes off to the rural areas to show off what they have achieved,” Gbadebo-Smith said. “Some achievements are real, for some it’s just a mirage, but everybody’s there showing off. So the young people in the villages very quickly come to the conclusion that ‘Hey, I’ve got to go to Lagos, make enough to be able to come back here, and to show off.’ ” In this way, the West African countryside is being rapidly depopulated.

Adegoke Taylor, a skinny, solemn thirty-two-year-old itinerant trader with anxious eyes, shares an eight-by-ten-foot room with three other young men, on an alley in Isale Eko several hundred feet from the Third Mainland Bridge. In 1999, Taylor came to Lagos from Ile-Oluji, a Yoruba town a hundred and thirty miles to the northeast. He had a degree in mining from a polytechnic school and the goal of establishing a professional career. Upon arriving in the city, he went to a club that played juju—pop music infused with Yoruba rhythms—and stayed out until two in the morning. “This experience alone makes me believe I have a new life living now,” he said, in English, the lingua franca of Lagos. “All the time, you see crowds everywhere. I was motivated by that. In the village, you’re not free at all, and whatever you’re going to do today you’ll do tomorrow.” Taylor soon found that none of the few mining positions being advertised in Lagos newspapers were open to him. “If you are not connected, it’s not easy, because there are many more applications than jobs,” he said. “The moment you don’t have a recognized person saying, ‘This is my boy, give him a job,’ it’s very hard. In this country, if you don’t belong to the élite”—he pronounced it “e-light ”—“you will find things very, very hard.”

Taylor fell into a series of odd jobs: changing money, peddling stationery and hair plaits, and moving heavy loads in a warehouse for a daily wage of four hundred naira—about three dollars. Occasionally, he worked for West African traders who came to the markets near the port and needed middlemen to locate goods. At first, he stayed with the sister of a childhood friend in Mushin, then found cheap lodging there in a shared room for seven dollars a month, until the building was burned down during the ethnic riots. Taylor lost everything. He decided to move to Lagos Island, where he pays a higher rent, twenty dollars a month.

Taylor had tried to leave Africa but was turned down for a visa by the American and British Embassies. At times, he longed for the calm of his home town, but there was never any question of returning to Ile-Oluji, with its early nights and monotonous days and the prospect of a lifetime of manual labor. His future was in Lagos, and he kept trying various small-business plans, none of which had worked out, for a simple reason. “There’s no capital to start,” he said. For this, he blamed the Nigerian government. “Most of the people who lead us embezzle instead of using that money to create factories,” he said. “Our parents’ generation was O.K. But this generation is a wasted generation—unless God comes to the aid. Because we know there is money in Nigeria.” In fact, oil-export revenue exceeded fifty billion dollars in 2005.

Taylor escorted me along the alley to my car, which was in the shadow of the bridge. We slipped past a menacing group of “area boys,” who act as parking attendants and shake down anyone who drives onto their turf.

“There’s no escape, except to make it,” Taylor said.

Stephen Omojoro, a fifty-two-year-old taxi-driver and father of four, with broad horizontal and vertical tribal scars carved into both cheeks, took me around Lagos in an aging Mercedes. In his version of the arrival story, Omojoro came to Lagos when he was seventeen, in the early seventies, after his father’s death forced him to quit school. He spent the first night with a relative, who gave him enough money for one dinner. After that, he was on his own. The following morning, having heard about the sawmills, he showed up and was given a job carrying planks and logs. At night, he slept outside. Many people in Lagos sleep where they work—in markets under flyovers, in truck cabs parked in truck yards, inside tiny shops, on the handlebars of their motorcycle taxis.

As we drove around the megacity, Omojoro described his recent history in a harsh, hoarse voice that seemed to have been seared by the polluted air. In his view, Lagos has been deteriorating since shortly after his arrival, owing to a general moral collapse brought on by the oil boom of the seventies. What he remembered as a city of enterprising family men like himself is now overrun with corrupt soldiers, politicians, and police, and with a mass of young people willing to do anything for money except honest work. He believes in order, and he disdainfully pointed out planned residential neighborhoods that are now overgrown with roadside markets, and “temporary” settlements that have survived for decades. (Omojoro once got into a shouting match with a woman in Mushin who had put out a display of wigs on a stretch of roadside pavement that theoretically belonged to traffic, not commerce.) He also condemned the heedless, often lethal driving of young men who, fortified at dawn by palm-wine gin or India hemp, make their living behind the wheel of the ubiquitous yellow passenger minibuses known as danfo. Omojoro described such drivers as “irresponsible somebodies—they don’t care for nobody, nobody cares for them.” (The wooden-backed pickup trucks used to carry produce and other goods are called bole kaja, which means “get down and let’s fight.”)

What is missing from Omojoro’s declinist account is the effect of national and international economic policies on the city. There was once a master plan for Lagos. One day, Oyesanya Oyelola, the director of the regional- and master-plan department in the state government, spread a faded map across his desk. The plan, jointly drawn up in the seventies by the firm of Wilbur Smith and Associates, the United Nations Development Program, and the Lagos state government, was intended to guide the growth of the city in the last two decades of the twentieth century. There were to be thirty-five self-sufficient district centers, represented on the map by clusters of dots, each with commercial, industrial, and residential zones, to prevent congestion on Lagos Island. A fourth mainland bridge would connect the Lekki peninsula, extending east from Victoria Island along the coast, to the towns popping up on the north shore of the lagoon, which would disperse traffic heading into the city. There was to be a light-rail and ferry system bringing commuters to the major business centers on the mainland and across to Lagos Island. To the east and west of the city, wetlands, forest, and agricultural land were reserved.

On New Year’s Eve, 1983, a bloodless coup overthrew civilian rule, and for the next sixteen years a series of military dictators from northern Nigeria treated Lagos, the country’s center of democratic activism, as a source of personal enrichment. While the military rulers cut themselves in on the city’s commercial action, the master plan “was abandoned,” Oyelola said, along with any thought of investing in the infrastructure necessary to absorb millions of new arrivals. He showed me the result, unfurling a second map of Lagos, as it is today: a sea of yellow spreading out across the mainland. “Most of the green land has been eaten up by the flow of people—it has become residential,” he said. On the master plan, there were forty-two areas identified as “blighted” and scheduled for improvement; now there are fifty-four.

Shina Loremikan, who runs an anti-corruption organization, lives in Ajegunle, Lagos’s biggest and most dangerous slum, across a canal from the port. The drainage ditches of Ajegunle are frequently blocked, and during the rainy season they overflow into houses and across streets, which fill up with sludge, sacks, scraps of clothing, and plastic bags, so that some of Ajegunle’s streets seem to be wholly composed of trash. I asked Loremikan to show me the slum areas on a map of Lagos. With his finger, he drew a line from the southeast corner all the way to the northwest. “From here to here, they are all slums,” Loremikan said flatly. “Refuse is everywhere, either in Victoria Island or Ikoyi”—Lagos’s two relatively upscale districts—“or in Agege or Mushin. Black water is everywhere. They are all slums.”

Other megacities, such as Bombay, Dhaka, Manila, and São Paulo, have spawned entire satellite cities that house migrants and the destitute, who lead lives that often have nothing to do with the urban center to which they were originally drawn. Lagos expanded differently: there is no distinct area where a million people squat in flimsy hovels. The whole city suffers from misuse. Planned residential areas—such as Surulere, built for civil servants on the mainland—are gradually taken over by the commercial activity that springs up everywhere in Lagos like fungus after the rains. Areas reclaimed from swamps give rise to economic clusters whose nature depends on location: for example, Mushin became one of the city’s central spare-parts yards when the Apapa-Oshodi Expressway was built near it, in the seventies. “Everywhere is market,” Stephen Omojoro said as we drove around. “There’s no dull area at all.” It’s hard to decide if the extravagant ugliness of the cityscape is a sign of vigor or of disease—a life force or an impending apocalypse.

Although new developments spring up in every possible direction—west toward the Benin border, north to the boundary of Lagos state, east toward the oil delta—most of them are unaffordable to the urban poor or too far from practical employment. Instead, Lagos packs its millions into existing concrete-block housing, in ever larger numbers. There was a building spree of public-housing projects in the years before the 1983 coup—the complexes are still called Jakande estates, after the Lagos state governor who led the effort—but today the clusters of eight- or ten-story high-rises have a leprous aspect, as if some blackening disease were creeping across their façades. Most of them are being sold off to private developers, who resell them at market rates.

In the mid-eighties, under the dictatorship of General Ibrahim Babangida, Nigeria submitted to austerity measures prescribed by the World Bank and the International Monetary Fund, in order to reduce a thirty-billion-dollar debt. Over time, the country shut down or sold off inefficient state-run enterprises, including construction industries, port facilities, oil refineries, and textile and steel mills; electricity, water, and telephone services were privatized. With these structural adjustments, civil-service jobs, the mainstay of the middle class in districts like Surulere, disappeared; meanwhile, privatization often occurred at fire-sale prices, with the profits benefitting politicians or soldiers and their cronies. The remaining savings were devoured by the corrupt military regimes. (An official report released after the fall of Babangida, in 1994, could not account for twelve billion dollars.)

The effect of these policies in Nigeria has been to concentrate enormous wealth in a few hands while leaving the vast majority of people poorer every year. The rare job that still awaits young men and women who come to Lagos pays less than it did a quarter century ago; it is also less likely to be salaried, and more likely to be menial. At the same time, the cost of rent, food, and fuel has soared. If there is an element of American frontier capitalism in the unregulated informal economy of Lagos, there is much less opportunity to make hard work pay off. And if the teeming slums of Lagos recall the “darkness, dirt, pestilence, obscenity, misery and early death” that Dickens described in an essay about Victorian London, there is no industrial base to offer the poor masses at least the possibility of regular employment.

One morning, on the entrance ramp to a highway, a Peugeot in front of Omojoro’s car braked in heavy traffic. Between us, a sinewy old man was pulling a two-wheeled cart loaded down with so much rusty machinery that he couldn’t keep it under control. It’s common in Lagos to see workers performing savagely hard labor out of the pre-industrial age. When the old man tried to stop, the cart’s right wheel sank into a pothole; then the cart lurched forward, its wooden handle breaking the glass of the Peugeot’s tail-light. The driver checked his rearview mirror and moved as if to get out, but before he could open his door two teen-agers who were sitting on the guardrail stood up and waved him to go on, then walked over and began negotiating with the old man, who was already reaching in his trouser pocket with a kind of humble resignation. The incident happened so fast that afterward Omojoro had to explain to me what had been immediately understood by all the participants. The teen-agers were area boys, and, since this block was under their control, the money that the old man owed the driver for his tail-light would, according to the city’s peculiar logic, go to them instead.

What looks like anarchic activity in Lagos is actually governed by a set of informal but ironclad rules. Although the vast majority of people in the city are small-time entrepreneurs, almost no one works for himself. Everyone occupies a place in an economic hierarchy and owes fealty, as well as cash, to the person above him—known as an oga, or master_—_who, in turn, provides help or protection. Every group of workers—even at the stolen-goods market in the Ijora district—has a union that amounts to an extortion racket. The teen-ager hawking sunglasses in traffic receives the merchandise from a wholesaler, to whom he turns over ninety per cent of his earnings; if he tries to cheat or cut out, his guarantor—an authority figure such as a relative or a man from his home town, known to the vender and the wholesaler alike—has to make up the loss, then hunt down his wayward charge. The patronage system helps the megacity absorb the continual influx of newcomers for whom the formal economy has no use. Wealth accrues not to the most imaginative or industrious but to those who rise up through the chain of patronage. It amounts to a predatory system of obligation, set down in no laws, enforced by implied threat.

Omojoro’s Mercedes was creeping through the dense market streets of Ajegunle one day when he started to make a left turn into a narrow road. Suddenly, a young man came out of the crowd, yelling that Omojoro had made an illegal turn. He was an agbero—a member of the transport workers’ union, whose official job is to act as an intermediary between bus drivers and their passengers. The agberos of the state transport union, who wore yellow-and-maroon reflector vests, were in open warfare with the agberos of the federal union, who wore white vests and black berets. This man wasn’t wearing a vest, but his swagger implied that the corner was under his personal control. He wanted money, on the pretext of helping Omojoro bribe the traffic police—he would keep part of it for himself, and the rest would go to his branch of the union local, one of fifty-seven in Lagos state. The agberos of a given zone have to generate a minimum of, say, thirty-five dollars a day for their local branch and the police. All this activity is technically illegal.

“Go to hell, I won’t deal with you,” Omojoro almost spat out the window. “You’re an agbero.”

The man glared and pointed. “You called me agbero because you don’t know me.”

“I don’t want to know you,” Omojoro said. “I respect the man in uniform.”

A traffic cop had come over to investigate the dispute. “I thank you for that statement,” he told Omojoro. “I am ready to settle with you.” They negotiated a fine down from fourteen dollars to three-fifty. Most people would have coöperated with the agbero, who always has a network of area boys in the vicinity, to vandalize the car until the driver pays up. Omojoro called the agberos bluff, having seen the traffic cop, who was forced to intervene, in order not to be reported up his chain of command for failing to take a bribe himself.

A sign near the headquarters of Shell Oil on Victoria Island says, “Did You go to School, College, University, Polytechnic, and you still throw Refuse out of your car or from the bus? Dump garbage bags on the road medians or in drains? Build your house/shop on drains? Urinate or defecate in public places? Then why did you bother to get an education? Think about it!”

The sign is part of a government-led campaign for beautification and order in Lagos. Such efforts appeal to the middle-class public-spiritedness of older Lagosians like Stephen Omojoro. But the megacity doesn’t encourage social responsibility and collective action to improve public life. The very scale of it is atomizing. The absence of government services in most neighborhoods rarely leads to protest; instead, it forces slum dwellers to become self-sufficient through illegal activity. They tap into electrical lines, causing blackouts and fires; they pay off local gangs to provide security, which means that justice in the slums is vigilante justice. In Mushin, several members of the Oodua People’s Congress, a Yoruba gang, displayed for me a suspected motorcycle thief whom they had caught the night before and were holding in a dingy back room of their clubhouse: he was chained at the hands and feet, and bleeding from the head. His captors hadn’t decided whether to turn him over to the police or simply kill him. Alongside the Badagry Expressway, I saw the charred remains of a corpse, recognizably human only from the buttocks and thighs, which had been burned and left to rot. No one I asked knew what it was doing there, and no one seemed particularly surprised.

In “Lagos: A City at Work,” a new book of photographs and essays published by a local bookshop, David Aradeon, a professor of architecture at the University of Lagos, writes, “The people who use public space in the city and those who are supposed to regulate its use are constantly reasserting their personal interests above and beyond the common interest, and that is really what the city is about. That is the story of Lagos. And how do we go about changing this?” I asked Paul Okunlola, of the Guardian, why there is no organization or political party representing the millions of poor people in Lagos. He explained that Nigeria has never seen the kind of mass movements that have flourished elsewhere in Africa; in Lagos, the spirit of individualism overwhelms the idea of solidarity. “Everybody believes that his lot can and will be better,” he said. “They see themselves in the mold of these more affluent people. In South Africa, they say, ‘Yes, I am living in a slum,’ and they will pull themselves together and fight on that basis. In Nigeria, the moment you call it a ‘slum dwellers’ association’ you will not find anybody who is ready to join.” The animating principle among the poor is the inevitability of the oga: no salvation without patronage. “You find people who think, It’s more worth my while to associate with this man who doles out some money to me from time to time rather than congregate with like-minded, like-situationed people who are not that well-to-do.”

The most famous shantytown in Lagos, called Maroko, rose up on prime oceanfront property along the southern shore of Victoria Island. In the eighties, the Lagos business district began to move to Victoria from Lagos Island, and the land became valuable. In July, 1990, the military government sent bulldozers and soldiers into Maroko, and within a few hours a quarter of a million people had been made homeless. A few miles down the coast from the site, in a concrete public-housing apartment whose ceiling was caving in, I found Prince S. A. Aiyeyemi, a sixty-eight-year-old retired postal-authority worker and the leader of the Maroko Evictees Committee. From his desk, he brought out a letter that he wanted me to give to Bola Tinubu, the Lagos governor. The letter demanded compensation for the loss of the houses owned by committee members and for resettlement to equivalent property. In the meantime, Aiyeyemi was allowing the apartment to which he’d been removed to disintegrate around him. He was slight and frail from a stroke that had left half his face paralyzed. “We shall continue to live till we get justice,” he said, slurring his words. “And, if we the elderly die, our children are ready to continue. This is our own contribution to the social engineering of Nigeria.” When I asked him whether it was fair for ten people to have to live in a single room, he said, “Well, there’s nothing we can do about that. We don’t take that so much as a social injustice. That is their economic limitations. It’s only when those ten people are tampered with by government, thrown out into the open air—that is social injustice.”

I had never heard anyone else in Lagos speak this way. This indignant old man was going to die waiting for something called justice, while everyone else in the city struggled.

Beneath the relentlessly commercial surface of Lagos lies a kind of moral unease. In many conversations, the physical blight of the city was described in ethical terms, as a general failure of character originating in the leaders and spreading down through the population. “The work ethic was destroyed by the military,” Folarin Gbadebo-Smith said. “It was substituted by a lottery mentality. You were going to make it, not because you put in all this work but because you were lucky. You knew someone, or your ticket came in.” Even the Pentecostal fervor that has swept across West Africa takes the form of personal striving in Lagos. Abandoned warehouses and factories on the Apapa-Oshodi Expressway have been converted into huge churches with signs that promise, “The Lord Shall Add,” and on Sundays they fill up with adherents of what is known as “the gospel of prosperity.” “They pray to be rich,” Omojoro said. “Whether they go to Heaven or to Hell, they could care less. Because Nigeria is a hell already.”

One afternoon, near the edge of Lagos Lagoon, I met a young man named Tosin Owolabi. He was barefoot, small, and solidly built, in rolled-up jeans and a dirty singlet, with the perpetually aggrieved scowl of a street urchin. He had been kicked out of school in his teens and now, at twenty-three, he was in constant motion at a variety of odd jobs at a nearby construction site: parking cars; running errands for his oga, who had set him up here; and loading concrete blocks and sand, which was retrieved by the bucketful from the bottom of the polluted lagoon by young men who dived forty feet without air. Owolabi spent his nights at the construction site and in the morning begged for water at a community borehole to wash himself in the bush. He smelled as if he’d missed a few days. Every Sunday, he went to church.

I asked Owolabi if he had a girlfriend. He sneered and burst out in rough, rapid English: “Lonely. Because when you have a girlfriend . . . I make a dollar and a half yesterday. To make it will be hard. Lonely. I have only me. I don’t waste my money. If I don’t eat, nobody will know. If I don’t give her seventy-five cents, she will not trust me. I trust myself, O.K.?”

Occasionally, he went on, he paid a girl a dollar or a dollar-fifty to sleep with him, but if she called him later on his cell phone he always said, “Bye-bye, safe journey.” Instead, he had saved his money—five hundred and seventy dollars, he said—and had paid a recording studio to produce his songs. They were traditional religious songs, and he sang one for me, in a high, sweet, but unremarkable voice:

God take my thanks

I am ready to praise you

Continue to do

As you are doing for me.

The studio scammed Owolabi and left him with a recording of terrible quality. Nevertheless, he was determined to try again, and had already saved more than a hundred dollars. He refused to accept that his hard-earned money could go to a likelier enterprise. Getting started as a dealer in building materials would cost him more than two thousand dollars. He was going to make it as a singer. He had put all his faith in God and himself. As we talked, he kept working, filling a customer’s bag with sand, scowling and arguing about the amount. “If you want to be a big somebody in this Nigeria, you need money,” he said.

Nigerians have become notorious for their Internet scams, such as e-mails with a bogus request to move funds to an offshore bank, which ask for the recipient’s account number in exchange for lucrative profit. The con, which originated in Lagos, represents the perversion of talent and initiative in a society where normal paths of opportunity are closed to all but the well connected. Corruption is intrinsic to getting anything done in Lagos: while stalled in traffic, Omojoro was often on the phone with his twenty-four-year-old daughter, who had recently taken her college-board exams and was trying to negotiate a price to obtain the results. (He ended up paying thirty-five dollars.) Even morgues demand bribes for the release of corpses. The shorthand for financial crimes is “419,” from the relevant chapter in the Nigerian criminal code. The words “This House Is Not for Sale: Beware of 419” are painted across the exterior walls of dilapidated houses all over the city—a warning to potential buyers not to be taken in by someone falsely claiming to be the owner.

The night before I left Lagos, Adegoke Taylor, the unemployed mining engineer in Isale Eko, sat down with me in the lobby of my hotel and laid out an offer. On a recent visit to his home village, he said, a high-school friend who had been the housekeeper of one of Nigeria’s military dictators revealed that he had stolen a million and a half pounds sterling from the dictator’s house after his death, in 1998. The money, Taylor said, was buried in a hole on a cacao farm, and the friend wanted to transfer it to Lagos and exchange it for naira. “ ‘It is too risky,’ ” Taylor said that he told his friend. “ ‘You can’t bring that much money to Lagos.’ ” Hesitantly, circuitously, Taylor arrived at his offer—a bank-to-bank transfer to my account. I had seen it coming and gently suggested that this was a dirty, dangerous business that neither of us would want any part of. Taylor backed off. “Wisdom is more important than money,” he announced as I escorted him out. Still, a business opportunity in the form of an American had come his way, and he would have been regarded locally as a fool if he hadn’t tried to exploit it. We said goodbye amicably, but he avoided my eyes.

The government that came to power in the democratic elections of 1999 has begun to revive the old master plan for Lagos. “We hope that, in the new plan, there will be a program for the poor people, to get affordable housing for them,” Oyesanya Oyelola, the state planning official, said. Conditions in Lagos have marginally improved since the restoration of civilian rule. The traffic jams have eased slightly with new roads, and trash removal has increased. One Saturday each month, the city shuts down and every homeowner or business owner is responsible for cleaning his property; the results are startling, for a few hours, anyway.

Bola Tinubu, the city’s governor, told me that when he was elected, in 1999, the scale of the task overwhelmed him. “Sky-high refuse!” he said. “It was a disaster area. It’s like a hurricane has just gone through Lagos state, on a daily basis.” He went on, “Now, compared to a serious civilization, Lagos state is dirty, very dirty. But, to an average Lagosian, it’s clean compared to what they faced before.”

I met the Governor in his large, gilt-trimmed flat on New Cavendish Street, in central London. Heavy-lidded and barefoot, wearing jeans and a striped T-shirt and sunk into an overstuffed sofa, Tin-ubu seemed to be temporarily convalescing from the job. I gave him the letter from the Maroko Evictees Committee; he cited his achievements in employment and housing creation, on an annual budget of three quarters of a billion dollars, and he blamed the federal government—which is based in Abuja, two hundred and fifty miles to the northeast, and has long had a hostile relationship with Lagos—for politically motivated financial neglect. “I need ten times what I’m having today,” Tinubu said. “The money that Lagos state is having is not enough to maintain a county hospital in New York.” The Governor, who once worked for Mobil Oil and for Deloitte, the accounting firm, brought out the report of a consultant hired to draw up a new master plan. It was much the same as the old, neglected one. The key, Tinubu said, is “to arrest the unplanned growth in different directions, the octopus of unplanned and uncontrolled building.” In London, the Governor sounded optimistic. He presented Lagos, with its phenomenal annual growth rate, as a victim of its own success.

Folarin Gbadebo-Smith, the local government chairman, was less sanguine. His district, eastern Lagos Island, includes extremes of wealth and poverty. A big man with a deep, self-confident voice, he is the son of middle-class Lagosians, and a dentist by trade. He spent years working hard and falling farther behind as the naira lost its value and the city descended into the corruption of military rule. Finally, after the restoration of democracy, he decided that it was time to stop complaining and do something. He ran for office in 2003 and now manages a district of seventy thousand people, installing public toilets and bus shelters, rebuilding primary schools, cleaning up streets, juggling the “diametrically opposed” interests of his rich and poor constituents, and, as he put it, “trying to maintain some sense of order.” He compared Lagos unfavorably with Rio de Janeiro, where, he said, “in the city center there is strict law enforcement. Here, the problem is everything is happening everywhere.”

We drove in his Land Rover to a parking lot next to a filthy police barracks, under an overpass leading to Victoria Island. Gbadebo-Smith had a plan to turn the lot into a nighttime market for venders and motorcycle-taxi drivers.

The owner of the lot, Jacob Wood, joined us for a walk around it. “Security should be very tough,” he said. He seemed eager to coöperate but skeptical of the plan.

“It will be tough,” Gbadebo-Smith agreed. He promised that the night market, with food stalls and music, would close at midnight. The real purpose of the project was to clear out the helter-skelter buying and selling in a neighborhood that was, by Lagos standards, upscale. “Get people off the street and give them something more organized,” Gbadebo-Smith said. “The first thing is to control who comes, because we can’t have the whole town coming here. We’d have to give sellers a license, so I can detect anyone who isn’t a resident of this place. I will aggressively pursue anyone selling on the street, and if necessary put them in jail.”

Gbadebo-Smith’s plan is part of the Kick Against Indiscipline, a citywide effort to rationalize Lagos—for example, to clear out the informal markets clogging nearly every street, with mobile courts issuing fines. The sawmills, whose smoke smothers traffic on the Third Mainland Bridge, are slated for removal to a site on the far side of the lagoon; the floating slum by the bridge is to be demolished and its fishermen residents sent to new residences on the north shore; the scrap yards and stolen-goods markets in Ijora are to be relocated westward. Government of-ficials talk of providing housing and job training to the displaced, to keep them anchored to their new neighborhoods. But I found it hard to imagine Gbadebo-Smith ever bringing order to his district. The hawkers would inevita-bly return to the traffic circles, for the same reason that hundreds of thousands of people continue to come to Lagos year after year. The con-centration of humanity brings work, which further intensifies the concentration. When I mentioned the Kick Against Indiscipline to Paul Okunlola, of the Guardian, he said, “It will never work. This is the only way people can make ends meet. Wherever there’s a traffic jam, you will see venders there. They’re like sprouts. You can’t get rid of them.”

The most widely available commodity in Lagos is garbage. It is an engine of growth in the underworld of the city’s informal economy, a vast sector with an astonishing volume of supply.

Babatunde Ilufoye, an Ibo in his early forties, was brought to Lagos at the age of eighteen, by a German man whose flat tire Ilufoye had fixed one day in his village, and who decided to teach the young man the import-export business. Today, Ilufoye lives near the sawmills, in the shabby-genteel district of Ebute-Meta, where there are many three-story colonial-era buildings in various stages of neglect. He is a polite, neatly dressed, hardworking man, whose wife owns a drygoods shop next to the house; in a European city, Ilufoye would be a successful entrepreneur. In 2004, after visiting a Lagos friend who dealt in cow horns and hooves, he went to an Internet café and typed those words into Google. Nothing useful appeared, but, when he entered “plastic scraps,” thousands of links came up.

Ilufoye is now a full-time exporter of recycled hard plastics, selling the ground-up fragments to Indian and South African companies for a minimum of a hundred dollars a ton. In choosing plastics, Ilufoye tapped into a growth market, but Nigeria’s international reputation as a breeding ground for online scam artists makes it difficult for him to find customers, and he can’t move the product fast enough to become profitable. “Do you expect me to commit a crime at this age and be locked up?” he e-mailed one wary Pakistani buyer. “If I’m not a fool at twenty-one or thirty, how can I be a fool now?”

Ilufoye’s grinder is Andrew Okolie, a gloomy man who operates two crushing machines in a gloomy concrete building under an expressway. The narrow rooms are filled to the ceilings with dirty plastic kitchenware, pails, milk cartons, empty bottles of shampoo, car-wash fluid, cosmetic gels, all pouring out of open doorways in little landslides. When I visited, the power had been out for days and Okolie sat idle in the front room, chewing hard on a piece of gum. Like Ilufoye, he is frustrated by structural limitations: he could handle a capacity of one ton a day, but he can’t afford a generator to keep his machines running during the frequent outages. Unless you are rich and connected, the banks charge as much as thirty-per-cent interest on loans, he said. To upgrade his business, Okolie needed someone to invest twenty thousand dollars, which he said he would be able to pay back in two years—because plastic is “in vogue these days.” The business was poised to take off, and Ilufoye and Okolie could put many youths to work. But nobody would help them realize their plan.

In the recycling business, Okolie said, most of the suppliers are “dropouts, miscreants”—scavenger boys who scour the gutters and streets and municipal dumps, filling up sacks or carts, and sell what they collect to their oga, who has twenty or so boys working for him, in a kind of dependency that resembles that of Fagin and the pickpockets of “Oliver Twist.” The oga, in turn, sells the refuse to Okolie, who then sells the ground bits to Ilufoye, who exports them. The scavengers, who are called pickers, can collect two or three hundred pounds of plastic a week, for which they are paid six cents per pound. They spend most of their cash, according to Okolie, on marijuana or glue.

Half a dozen miles north of Andrew Okolie’s plastics-grinding shop, along the expressway, is the largest municipal dump in Lagos. The first time I visited, a line of trucks stretched from the dumping area to the highway. One badly overloaded truck had tipped over on the entrance road and taken down another, and the mound of garbage left by the spill made it difficult for other trucks to move past. On the entrance road, I met a young plastics picker named Ayo Adio, who had arrived by standing on the back of a garbage truck. He carried a nylon sack, into which he was dropping scraps of plastic from the roadside with a piece of steel rebar bent into a hook. Adio’s expression was grim, and he had smeared white lotion across his face, which made him look like a mournful clown. I noticed that other pickers wore plastic masks or face cloths. At the approach to the dump site, the smell of burning rot became overpowering.

Hundreds of pickers were trudging across an undulating landscape of garbage. Every minute, another dump truck backed in and released its load, with a tremendous sliding noise culminating in a crash that shook the trash underfoot. As a bulldozer pushed the fresh garbage up into a wave that crested and broke across the older landfill, the pickers rushed over it, swarming dangerously close to the vehicles. Bent under their sacks, they worked quickly and with focus, knowing what they were looking for. Some pickers wanted only copper; others specialized in printer cartridges. One man inspected a wheel axle for half a minute before tossing it aside. A girl sold water from a bucket on her head. Most of the scavengers had closed shoes and some kind of headwear, but only a few wore rubber boots and gloves. They all clawed at the trash with bent rebar, sharpened with use to a shiny point.

A fifty-year-old man with squinting red eyes named Moshood Babatunde, who was wearing a baseball cap and an impossibly clean white shirt, paused to talk with me. He had been working at this dump for fifteen years, collecting wire. On a good day, he said, he made two and a half or three dollars. But, because of the soaring rents in Lagos, he had to commute by train and bus to the dump site from a neighboring state, which cost him almost two dollars a day. He supported five children, three of them in school. “If you don’t find some help, you have to help yourself,” he said. “I thank God, I will never regret this opportunity.”

The dump—a hole gouged out of the earth—is as broad as a small town, and surrounded on all sides by fifty-foot cliffs composed of laterite and garbage. We were standing at the edge of one such cliff, and the pickers took turns pushing their full sacks over the edge, sending them bouncing down to the bottom and then scurrying after them. Across the floor of the pit are hundreds of hovels, a sizable shantytown of dwellings made of plastic sheeting and scrap metal bound together with baling wire. A thousand pickers live down in the pit, among flocks of white cowbirds, and middlemen come to buy their stock. The pickers have built a mosque and a church, and at Christmas they celebrate by decorating their shacks.

“It is somewhere between the law of the jungle and civilization,” Aremu Hakeem, a municipal worker with a master’s degree, who escorted me across the dump site, said. “They have an organization, a chairman, rules and regulations. But the physically stronger prevail when the trucks come.” Hakeem spoke excitedly about recent improvements to the dump, including the opening of the entrance road. He had read books about landfills and checked out garbage-related Web sites. He was extremely proud of the dump, which he called a “reference point” for all of Nigeria. Then he gazed out over the site and grew quiet. “Someday I would like to come to your country and use what I have here,” he said, pointing to his head. “Here we are not using it very much.”

In an essay called “Fragments of a Lecture on Lagos,” Rem Koolhaas described how his team, on its first visit to the city, was too intimidated to leave its car. Eventually, the group rented the Nigerian President’s helicopter and was granted a more reassuring view:

From the air, the apparently burning garbage heap turned out to be, in fact, a village, an urban phenomenon with a highly organized community living on its crust. . . . What seemed, on ground level, an accumulation of dysfunctional movements, seemed from above an impressive performance, evidence of how well Lagos might perform if it were the third largest city in the world.

The impulse to look at an “apparently burning garbage heap” and see an “urban phenomenon,” and then make it the raw material of an elaborate aesthetic construct, is not so different from the more common impulse not to look at all. And that reaction is understandable, for the human misery of Lagos not only overwhelms one’s senses and sympathy but also seems irreversible. Koolhaas’s words reminded me of something that Gbadebo-Smith told me. “You’re aware of the ‘megacity’ thing,” he said. “Lagosians sometimes talk about it as a trophy. As far as I’m concerned, it’s an impending disaster.” The vision of twenty-three million people squeezed together and trying to survive, like creatures in a mad demographer’s experiment gone badly wrong, fills Gbadebo-Smith with foreboding. “We have a massive growth in population with a stagnant or shrinking economy,” he said. “Picture this city ten, twenty years from now. This is not the urban poor—this is the new urban destitute.” He expressed surprise that the level of crime and ethnic violence in Lagos, let alone civil insurrection, is still relatively contained. “We’re sitting on a powder keg here,” he said. “If we don’t address this question of economic growth, and I mean vigorously, there is no doubt as to what’s going to happen here eventually. It’s just going to boil over.” He added, “And guess what? If all this fails, the world will feel the weight of Lagos not working out.”

There is an even darker possibility: that the world won’t feel the weight of it much at all. The really disturbing thing about Lagos’s pickers and venders is that their lives have essentially nothing to do with ours. They scavenge an existence beyond the margins of macroeconomics. They are, in the harsh terms of globalization, superfluous. ♦