Individuals survive by being a part of a group or mafia that can protect their interests/CPS:QUOTE>
The fact that al-Qaeda men were in Karachi rather than holed up in a tribal area may surprise some.
But in fact these men are probably less conspicuous in Karachi than even among sympathetic tribal groups in the north.
Karachi is a densely populated port city, bursting at the seams. A 1998 census put the population at just under 10 million - but a more realistic figure is probably over 16m.
The population is multi-ethnic, with about 500,000 new economic migrants arriving in the city every year - not just from the other provinces but also from neighbouring countries like Afghanistan, Bangladesh, Nepal and Sri Lanka.
The city's population is highly diverse - but it is hardly a melting pot. Individuals survive by being a part of a group or mafia that can protect their interests.
At the time of the partition of the sub-continent in 1947, Karachi was a sophisticated trading city inhabited by a large number of affluent Hindus, Parsis, Muslims and Christians.
Daniel Pearl in shackles after his kidnapping in Karachi
Two factors started post-partition Karachi off on the wrong footing. One was the controversial choice of the city as Pakistan's federal capital - which effectively cut it off in administrative terms from Sindh province which surrounds it.
The second factor was the arrival of 600,000 refugees from the Muslim areas of India after partition. These Urdu-speaking refugees (Muhajirs) and their subsequent desire to get government and white-collar jobs was much resented by native Sindhis.
Karachi was the federal capital for only 12 years, and when the central government transferred to the Punjab, the city was left with a sense of abandonment.
Eleven were hurt in a blast at an Anglican church in January 2004
This sense of exploitation is reflected in the complaint by many of Karachi's inhabitants that the city is the source of 40% of Pakistan's revenues - yet gets very little in return.
It continued as a bustling port and trading centre and economic migration rose, especially by Pashtuns from the North-West Frontier Province who made up most of the labour force for the city's construction.
But ethnic differences between Pashtuns and Muhajirs began to emerge. In the 1970s, there were also tensions between Muhajirs and native Sindhis.
By the 1980s, there was a considerable influx of weapons due to the use of Pakistan as a conduit for US arms to Afghanistan. The city's various vested interests became armed and dangerous, resulting in sometimes violent clashes.
Municipal planning and development in Karachi has not kept pace with its growth. Since there was insufficient housing available to migrants this resulted in large squatter settlements and slums.
Today, about five million people live in these sorts of dwelling.
Transport is woefully inadequate and water supply and housing problems remain chronic.
Protesters riot in support of disgraced nuclear scientist AQ Khan
As demand for these services outstrips the government's ability to supply them, a lucrative sub-economy has sprung up where everything is available - for a price.
Rival mafias have marked out their turf and consolidated their businesses, often winning over law enforcers and administrators by offering them a slice of the pie.
During the Zia years, local elections were put on hold, so for years Karachi's inhabitants had no local representation, nobody who they could go to and demand action on local issues.
This strengthened people's dependence on special interest groups, whether ethnic or sectarian.
In the past two decades crimes like kidnapping for ransom, car-jacking and armed robbery have shot up.
These crimes are often committed by people with links to various political or religious groups, and are a way for them to raise funds to keep their activities going.
The authorities say Karachi is an extremely difficult city to police, partly because of the constantly changing population - but mainly because of the tangled web of vested interests that operates outside the law.