KARACHI, Pakistan -- Islamist militants who attacked a police facility in the heart of Pakistan's largest city were attempting to free comrades they believed were detained there, a senior minister said Friday.

The coordinated assault late Thursday in Karachi, using a car bomb and guns far from Taliban and Al Qaeda heartlands along the Afghan border, showed the ability of militants to strike back despite being hit by U.S. drone strikes and Pakistani army operations.

A gang of around six gunmen managed to penetrate a high-security area of Karachi that is home to the U.S Consulate, two luxury hotels and the offices of regional leaders. They opened fire on the offices of the Crime Investigation Department before detonating a huge car bomb that leveled the building and others nearby.

The police offices housed a detention facility that was believed to be holding criminals.

The CID takes the lead in hunting down terrorists in Karachi. Earlier this week, the agency arrested six members of Lashkar-e-Jhangvi, an Al Qaeda linked group blamed for several high profile attacks in recent years. The suspects were presented before a court earlier Thursday.

"The terrorists were well prepared and they had came here to rescue their associates. But under a strategy, we had not kept those men at this building. So their plan failed," said Qaim Ali Shah, the chief minister of Sindh province, of which Karachi is the capital.

He did not say how he knew that the gang was attempting a rescue and not simply attacking the building, the type of strike that militants in Pakistan have often carried out in the past. Shah and other officials have not said whether the attackers escaped or where killed in the blast, which left a crater 10-feet (3-meter) wide in the floor.

Islamist militants are known to have found shelter among Karachi's 14 million people, and there have been occasional attacks on Shiite Muslims, whom Al Qaeda and the Taliban believe to be infidels, as well a blast last month at a Sufi shrine.

But the city had largely escaped a wave of violence last year that saw many attacks in Lahore, Peshawar and other cities.

"These attacks which are happening around the country, they are carried out by enemies of the nation," said Karachi resident Faisal Mehmood. "It is not in Islam that you kill your brothers."

The government has declared war on the militants, and the army has moved into several areas in the northwest close to Afghanistan where the fighters are primarily based. The United States has increased the tempo of missile strikes in the region over the last two months, with close to 100 this year alone.

But the Pakistani state still distinguishes between militants who attack inside Pakistan and those who focus on fighting U.S. troops in Afghanistan or Indian rule in the disputed Kashmir region, believing the latter to be "good" militants. Critics say this policy is shortsighted, noting that groups are increasingly coalescing and support each other.

The Pakistani Taliban claimed responsibility for the attack, according to media reports. However, Interior Minister Rehman Malik said Lashkar-e-Jhangvi was the more likely culprit, or that it was working with the Taliban.

The Pakistani Taliban is allied with Al Qaeda and has emerged as the most potent threat to the stability of the nuclear-armed country since 2007. Its suicide squads have killed thousands of people in attacks on government, security force and Western targets, most of them civilians, shaking faith in the civilian government.