The unrest was the most serious to buffet the new Pakistani government as it prepared to assail the powers of Pervez Musharraf, the president.
The violence began when lawyers affiliated with the Mutahida Qaumi Movement, an ethnic-based political party that was part of the previous government, held a demonstration on Wednesday afternoon outside Karachi's main courts complex.
They were protesting against an assault on a former cabinet minister the previous day.
Police and witnesses said other lawyers leaving a bar association meeting got involved in a scuffle with the protesters.
About eight people were injured. Minutes later, men in civilian clothes arrived and began shooting, looting and torching cars, witnesses said.
An office block near the courts was set ablaze and five charred bodies, including at least one attorney, were found on the sixth floor.
"A group of goons attacked the lawyers. Everybody knows who these people are"
Rashid Rizvi, senior attorney
Police and hospital officials said a paramedic and a passer-by were wounded by gunfire, and that the injured included a 7-year-old child with a bullet wound to the head.
A bus driver who was shot died later in hospital, Siddiqi said.
Rizvi, secretary general of the Sindh High Court Bar Association, denied the unrest was triggered by a clash between lawyers' groups.
"A group of goons attacked the lawyers. Everybody knows who these people are," he said, without naming anyone.
"Nobody can suppress our struggle for the restoration of the judges and the judiciary."
About 20,000 security forces have been deployed to patrol the city's streets, check vehicles and guard courthouses, schools and markets, Siddiqi said.
Yousaf Raza Gilani, the prime minister, condemned the violence and urged citizens of Karachi, a chaotic and often lawless port city of 15 million people, to remain calm.
Gilani appealed to "all political forces to ensure peace and harmony in the metropolitan city in order to support political stability", according to a statement from his office.
But the incident could set back his coalition's effort to woo political rivals and cement Pakistan's return to democracy after years of military rule.