LAHORE, Pakistan // Pakistani Taliban claimed responsibility today for a suicide gun and bomb attack in the city of Lahore the previous day that killed 24 people and wounded nearly 300. "We have achieved our target. We were looking for this target for a long time. It was a reaction to the Swat operation," a militant commander, Hakimullah Mehsud, told Reuters by telephone from undisclosed location, referring to an army offensive in the Swat region. Gunmen detonated a car bomb yesterday near police and intelligence agency offices that collapsed one building and sheared the walls off others in one of the deadliest attacks in Pakistan this year. The interior minister Rehman Malik said the bombing could be retaliation for the government's military offensive to routeTaliban militants from the northwestern Swat Valley. Lahore, Pakistan's second-largest city, sits near the Indian border and is considered a liberal, cultural capital. Assaults there have heightened fears that militancy in nuclear-armed Pakistan is spreading well beyond the northwest region bordering Afghanistan. Wednesday's attack was the third major strike in Lahore in recent months. No one immediately claimed responsibility for the latest bombing. Police said two suspects were detained. Raja Riaz, a senior minister in the Punjab provincial government, told reporters about 30 people were killed. Sajjad Bhutta, another senior government official, told reporters more than 250 people were wounded. A police building collapsed in the blast, and rescuers rushed to free officers buried in the rubble. The explosion also sheared the walls off neighboring buildings in a main business district. The ceilings of operating rooms in a nearby hospital also collapsed, injuring 20 people. Agents from the Inter-Services Intelligence agency were among the dead, a senior official told reporters on condition of anonymity because he was not authorised to talk to the media. "The moment the blast happened, everything went dark in front of my eyes," witness Muhammad Ali said. "The way the blast happened, then gunfire, it looked as if there was a battle going on." Sajjad Bhutta, a senior government official in Lahore, told reporters a car carrying several gunmen pulled up on a street between offices of the emergency police and the intelligence agency, Pakistan's premier spy organisation. "As some people came out from that vehicle and started firing at the ISI office, the guards from inside that building returned fire," he said. As the shooting continued, the car exploded, he said. Police had little chance to react to the gunshots before the blast. "All of a sudden we heard a loud sound and the roof collapsed on us," said Mohammad Rehman, a police official who was wounded and taken to a nearby hospital. "First of all though, we heard the sound of gunfire, then the blast occurred." Mr Malik blamed the attack on militants that government forces are fighting in the Swat Valley and the border region where US and other officials believe al Qa'ida and Taliban militants are using to plan attacks on Western forces in Afghanistan. "They are anti-state elements, and after being defeated in Swat, they have moved to our big cities," Mr Malik told the Express news channel. Pakistan's president Asif Ali Zardari condemned the attack and said in a statement the government remained committed to rooting out terrorism. The offensive in Swat is seen as a test of the government's resolve to combat the spread of militancy, and is strongly backed by Washington and Pakistan's other Western allies. The army has said at least 1,100 militants have been killed in the monthlong operation and that Taliban fighters are in retreat. The military today said troops had cleared militants out of Piochar, a village in a remote part of Swat that is the rear base for Taliban leader Maulana Fazlullah, and predicted that Mingora, the largest town in the valley, would be cleared of militants within three days. Two other areas, Sultanwas and Mohmand, had also been emptied of militants and were now safe enough for refugees who have fled the fighting to return home. It was the first time the military has invited some of the more than 2 million refugees from the region to return to their villages since the fighting began, setting off an exodus that aid officials have warned could turn into a humanitarian disaster. In March, a group of gunmen attacked Sri Lanka's visiting cricket team in the heart of the city, killing six police officers and a driver and wounding several players. Later that month, gunmen raided a police academy on the city's outskirts, leaving at least 12 dead during an eight-hour standoff with security forces, including army troops. Pakistani Taliban chief Baitullah Mehsud claimed responsibility. A variety of militant groups exist in Pakistan beyond al-Qaida and the Taliban, and officials and analysts believe they are increasingly inter-linked, which could make it easier to stage more sophisticated attacks. Punjab is Pakistan's most populous province and home to some of its most violent groups. *AP and Reuters