From a berm on the edge of the Korangi industrial area, green agricultural lands stretch north toward the Malir River. On the other side of the slope lies Mehran Town, a shrubby, sandy expanse of once empty public land that has been illegally subdivided into hundreds of residential plots. Beyond that is a sprawling patchwork of factories, sewage-treatment plants, and tanneries. The scene could inspire a Pakistani Diego Rivera: the history of Karachi's development telescoped into a single tableau.

Each year, an estimated one million people from across rural Pakistan migrate to Karachi and move into similar katchi abadis, essentially unplanned slums, which are growing on the city's periphery at a rate of 100,000 plots annually. The influx is fueling violent competition among the city's ethnic political parties, and the criminal elements affiliated with them, for control of lucrative and increasingly scarce land as well as over the new residents' electoral loyalties.

In Mehran, where only a handful of families have moved in, the unfinished housing units are covered in the flags of these political parties, and the boundary walls are slathered in graffiti. As the area is carved up, shoot-outs and killings between rival "land grabbers" have been frequent, a police official told me.

For Pakistan's poorest laborers, life in a Karachi slum allows for greater opportunity than one spent under the heel of an oppressive rural social structure in which the country's old feudal order mixes with the newer cash economy dominated by predatory middlemen. This dynamic is pushing the country's most important sociological trend: urbanization. Many estimates suggest that at least 50 percent of Pakistanis now live in urban areas, compared to under 18 percent 60 years ago. Many of them have come to Karachi, whose population grew by nearly 90 percent between the 1981 and 1998 censuses.

Karachi is Pakistan's largest city and its financial capital, providing the majority of the country's tax revenue and nearly a quarter of its GDP. It is a miniature Pakistan: every major regional ethnic group in the country is represented in substantial numbers. The city's politics are dominated by the Muttahida Quami Movement (MQM), a notionally secular party claiming to represent the largest "ethnic" group -- the Muhajirs, Urdu-speaking descendants of the refugees who left India during partition in 1947.

But the MQM is in relative decline: although Muhajirs make up almost 50 percent of Karachi's population, the party has no provincial population to draw from and is facing a steady influx of Pashtun workers, whose numbers have grown since 2002, when the fight against insurgents in the country's northwest first gained momentum and pushed millions of people south. The city's other major political parties have adopted the MQM model, propagating narratives of perceived inequality along ethnic lines. The Awami National Party (ANP), which claims to represent Karachi's estimated five million Pashtuns, is attempting to carve out an increasing share of power. It is allied with the Pakistan People's Party (PPP), a Sindh-based party that rules at both the national and provincial levels but is a minor power in Karachi, where it effectively represents Sindhis and Balochis.

The MQM's unwillingness to accommodate a growing population of Pashtuns is at the root of what is beginning to be described as a "civil war" inside Karachi. In 2010, nearly 1,400 people -- almost as many as were killed in suicide bombings and terrorist attacks over the same period -- died in "target killings" of party workers and members of one or another ethnic group.

The violence is sometimes the result of armed cadres affiliated with the MQM or ANP taking up the fight of aggrieved community members, such as when Muhajir students are harassed walking to school through Pashtun areas, or when "minority" residents are asked to pay protection money. But Karachi's political observers, urban rights activists, and even police officials agree that much of the violence is being driven by the militant cadres of the parties (and the criminal groups affiliated with them) for control of land and profits and to increase their respective ethnic base's representation in contested voting districts.

After the MQM leader Raza Haider was assassinated last August, more than a hundred people, mostly Pashtuns, were killed in three days of violence. Naseeb, a Karachi-born Pashtun from ANP-controlled Qasba Colony, said that after Haider was killed, random Pashtuns were targeted daily: "They just saw someone wearing a shalwar kameez and they assumed he was a Pashtun and shot him without asking."

One root cause of the ethnic strife is the retreat of the state; Karachi's local government has simply failed to keep up with the city's expanding population. It has refused or been unable to provide basic physical infrastructure and services, such as housing, water, and electricity, or economic opportunities and resources to the majority of residents. Instead, the urban poor have relied on ethnic-based sector entrepreneurs to provide these essential services. This informality in social and economic relations has allowed ethnic rivalries to fester.

The dynamic is perhaps best illustrated by Karachi's haphazard land-development policies. So-called developers take over state land illegally and rent plots to people from their own ethnic group. The tenants gradually obtain services such as electricity and running water from illegal contractors and middlemen who bribe municipal officials and police to look the other way. Many people in these communities work in the informal economy, with transactions and contracts guaranteed by ethnic organizations such as the MQM or ANP. Eventually, the residents of these unofficial plots organize themselves and demand formal recognition and protection from the state.

But in recent years, the land on which informal settlements can be built has grown scarce. This is a result of two factors: first, in the early part of this decade, international financial institutions required that the government sell off a large proportion of publicly owned land to the private sector as a condition for loans; second, demand for real estate spiked after foreign aid jump-started Pakistan's economy after 9/11. In fact, one of the central causes suspected in the city's recent violence is the vying for control over the remaining land by "mafias" affiliated with the various political parties.

Competition has grown only more intense since last fall, after intense flooding in Pakistan's rural areas sent tens of thousands of refugees to Karachi. These internally displaced people are being courted by the ANP and PPP. Residents of a camp near Hawke's Bay told me that activists from both parties have visited them with promises of land and jobs. Taj Haider, the PPP's secretary-general of Sindh, has said that the provincial government will donate 20,000 plots of land to the Sindhi refugees in Karachi.

Thousands of new, relatively poor migrant workers to Karachi will force to the forefront many of the questions that have long been ignored by the country's political elite. In the immediate term, as Pakistan's population moves to cities or is absorbed by them, will the services sector be able to support them? If so, the ranks of the lower middle and middle classes will continue to expand. Will this emergent urban middle class articulate its political demands not in terms of ethnicity but through the usual middle-class priorities of jobs, education, and health care?

If such a transformation takes place, then the MQM, the party with its finger closest to the pulse of the urban lower middle classes, could be well positioned to evolve into a true national party. But its desire to rebrand itself at the national level as a postethnic party of the middle class is undermined by its rhetoric and actions in Karachi, and for this reason, it seems doubtful it will have widespread success in rural Sindh or Punjab. At the same time, the Punjab-based Pakistan Muslim League-Nawaz, which represents the economic interests as well as the conservative cultural ethos of the largest province's business-minded middle classes, will likely attempt to court the freshly minted petite bourgeois.

In Karachi, the expansion of the middle class has already altered society. The city's lower-middle-class youth are educated in private technical schools -- mostly in information technology -- in the hope of joining the private sector. (About 75 percent of workers, however, still take jobs in the informal economy, which requires little or no formal education.) Women are following a similar path, and there are now more female students at the University of Karachi than males. On the whole, these trends mean that there are more young, unmarried, and educated people in Karachi than ever before. With their newly bought televisions and computers, they are imbibing Indian and Western consumer culture. But with a battered economy and inflation back up to 15 percent, these aspirations far outstrip the current reality. Will the state be able to respond to urbanization with policies that sustain it? For many young urban Pakistanis, traditional religion has been replaced by a modern and globalized Islam. Will the further erosion of the economy increase the pull of sectarian and militant groups?

Perhaps more realistically -- and perniciously -- the disenchantment of young urban Pakistanis will exacerbate the middle class's ideological confusion, which has spawned widespread passive moral support for religious militants. After this week's assassination of Punjab Governor Salman Taseer by a bodyguard who was angered by the politician's condemnation of Pakistan's irrational blasphemy laws, thousands of middle-class Pakistani Facebook users joined groups that glorified the alleged killer. Many of the online supporters of this religiously inspired murderer are also graduates of Pakistan's universities and fans of decidedly un-Islamic cultural imports such as the rap artist Lil Wayne and the television show Family Guy.

One evening in Karachi, I talked with a group of young Muhajir men and women from Orangi Town. Each had completed high school; some were pursuing college degrees, and all had put themselves through private English-language courses. Their parents had migrated to Karachi in the 1970s and '80s and had spent their lives working as laborers in the city's nearby factories. They were unanimously frustrated with what one of them, Amjad Ali, a 28-year-old wearing jeans and a checkered shirt, called the "unfair game" of lower-middle-class life in Karachi, where only those with political connections are able to work their way to prosperity.

The gap between their hungry generation's newfound aspirations and the realities of Karachi is pushing many to join the city's ethnic and political organizations. Muhammad Shamsuddin, a community organizer in Orangi, later told me that all young people in the area have allegiances to such groups. "They are only interested in social mobility, and they'll support any party that can help," he said.

You are reading a free article.

Subscribe to Foreign Affairs to get unlimited access.

  • Paywall-free reading of new articles and a century of archives
  • Unlock access to iOS/Android apps to save editions for offline reading
  • Six issues a year in print, online, and audio editions
Subscribe Now
  • TAIMUR KHAN is a freelance journalist based in Karachi and New York. He was until recently a Senior Editor at The National in Abu Dhabi.
  • More By Taimur Khan