Three Pakistani soldiers were killed and 20 more injured when a suicide bomber drove an explosive-packed truck into a paramilitary compound.
The attack underlined the deteriorating security in Karachi, the sprawling port city of 18 million people that is the nation's economic hub. Violence has escalated in recent years in the city as armed groups fight for control of land and resources, and militant groups like the Taliban have used the chaos to consolidate their foothold.
Thursday's attack targeted a housing compound for the Rangers, a paramilitary force that is tasked with helping Karachi police maintain security in the city, said Javed Odho, deputy inspector general of the Karachi police.
Three security personnel were killed and 20 were wounded in the explosion, said a spokesman for the Rangers, speaking on condition of anonymity in line with regulations. He said the blast would not deter the force from pursuing operations against militants in the city.
Witnesses reported seeing a large plume of smoke rise into the sky from the residential block. Pakistani television showed images of the blast site, what appeared to be an apartment block with a gaping hole in the middle. A part of the two-story building was razed.
The Rangers set up a perimeter around the building to keep journalists and bystanders at bay.
One of the Rangers, Muhammed Farooq, said he was preparing for work when he looked out the window and saw a vehicle smash through the main gate and into the building.