Gunmen detonated a car bomb near police and intelligence agency offices in Lahore on Wednesday, killing about 30 people and wounding at least 250 in one of Pakistan's deadliest attacks this year, officials said. At least four men with rifles stepped from the car and opened fire on the intelligence agency building, then set off a massive blast when security guards returned fire, officials said. Interior Minister Rehman Malik suggested the attack could be retaliation for the government's military offensive to rout Taliban militants from the northwestern Swat Valley. Lahore is the country's second-largest city and sits near the Indian border, and 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 that about 30 people were killed. Sajjad Bhutta, another senior government official, told reporters more than 250 people were injured. The explosion sheared the walls off buildings in a main business district. The ceilings of operating rooms in a nearby hospital collapsed, injuring 20 people. TV footage showed bleeding bystanders and emergency workers carrying the injured toward ambulances. Rescuers rushed to free officers buried in the rubble. "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 that a car carrying several gunmen pulled up in a street between offices of the emergency police and the Inter-Service Intelligence agency, Pakistan's premier spy agency. "As some people came out from that vehicle and starting firing at the ISI office, the guards from inside that building returned fire," he said. As the firing continued, the car suddenly exploded, he said. The spy agency and police building were both badly damaged. An AP reporter saw dozens of troops entering the spy agency building to supervise the rescue work, while gunshots were heard from inside the building even one hour after the blast. Television footage showed officers dragging a man from the scene. Malik blamed the attack on militants that government forces are fighting in the Swat Valley and the Federally Administered Tribal Areas near Afghanistan. "These terrorists were defeated in FATA and Swat and now they have come here," he told reporters. 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 left dead in the month-long operation. The offensive has spurred fears that the Taliban could stage revenge assaults. The Inter-Services Intelligence agency is not directly involved in the fighting in Swat but is responsible for gathering intelligence to support the operation. The agency has also been behind the arrest of top al-Qaida operatives in recent years, and is responsible for the detention and interrogation of terrorist suspects. Wednesday's attack was the third major one in Lahore this year. 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, multidimensional attacks. Punjab is Pakistan's most populous province and home to some of its most violent groups. The Inter-Services Intelligence agency is believed to have helped set some of them up in Pakistan's dispute with India over the Kashmir region. US officials have said the spy agency still maintains links with some of the outfits, vexing Washington.