RAWALPINDI, Pakistan (Reuters) -- Pakistani commandos stormed an office building on October 11 and rescued 39 people whom suspected Taliban militants took hostage after a brazen attack on the army's headquarters.
The October 10 attack on the tightly guarded army headquarters in the city of Rawalpindi came as the military prepared an offensive against the militants in their stronghold of South Waziristan on the Afghan border.
The strike at the heart of the powerful military called into question government assertions the militants were virtually crippled by recent setbacks. But a top official said it only underlined the need to finish them off.
Three hostages, two commandos, and four of the gunmen were killed in the pre-dawn rescue operation, said army spokesman Major General Athar Abbas. One wounded gunman was captured.
"Now there is no terrorist left there. The operation is over," Abbas told Reuters.
Pakistani Taliban militants linked to Al-Qaeda have launched numerous attacks over the past couple of years, most aimed at the government and security forces, including bomb attacks in Rawalpindi.
On October 10, gunmen wearing army uniforms attacked the army headquarters killing six soldiers including a brigadier and a lieutenant colonel in a gun battle at a main gate.
Five gunmen were killed there and two of their wounded colleagues captured. But others fled and took hostages in a building housing security offices near the headquarters.
Commandos launched their rescue assault under cover of darkness with a blast and gunfire erupting at 6 a.m.
"They were in a room with a terrorist who was wearing a suicide jacket but the commandos acted promptly and gunned him down before he could pull the trigger," Abbas said of one large group of hostages.
"Three of the hostages were killed due to militant firing," he said. More hostages were later found alive.
The attack on the army came after a violent week.
On October 5, a suicide bomber attacked a UN office in Islamabad killing five members of staff, and on October 9 a suspected suicide bomber killed 49 people in Peshawar.
"What happened in Peshawar, Islamabad and today, all roads lead to South Waziristan," Interior Minister Rehman Malik said on October 10. "Now the government has no other option but to launch an offensive."
The army has been preparing an offensive with air and artillery attacks but has not said when ground troops will go in.
The Rawalpindi raid bore the hallmarks of several similarly audacious "swarm" attacks this year.
In March, gunmen attacked Sri Lanka's cricket team as it drove to a match in the city of Lahore and weeks later militants raided a police cadet college in the same city.
Those attacks were blamed on the Pakistani Taliban, widely believed to have been helped by militant groups based in Punjab Province.
At least some gunmen who carried out the Rawalpindi raid this weekend were believed to have been Punjabis. Some hostage takers' phone calls were intercepted and they were speaking Punjabi, a security official said.
The United States needs Pakistani help against militants crossing into Afghanistan to fight U.S.-led forces there and has been urging action against Afghan Taliban factions on the border.
In March, militants pushed to within 100 kilometers of Islamabad, sparking grave concern among allies, including the United States, for Pakistan's prospects and fears for the safety of its nuclear weapons.
In late April, the army launched an offensive in the Swat valley, 120 kilometers northwest of Islamabad, and largely cleared the Taliban out.
The militants suffered another big blow on August 5, when their leader, Baitullah Mehsud, was killed in a missile attack by a U.S. drone aircraft. His successor vowed revenge last week.
U.S. Secretary of State Hillary Clinton condemned the October 10 attack, saying it showed the threat to the Pakistani government and the very important steps the civilian leadership and military were taking to root out extremists.
North West Frontier Province Information Minister Iftikhar Hussain called on October 10 for the elimination of militant bases in Punjab. Even if a South Waziristan offensive was successful militants would still get help from Punjab, he told reporters.