A Taliban suicide squad targeted Pakistani military officers and their families praying at a mosque Friday close to army headquarters in a gruesome display of the militants' ability to strike at the center of power in this U.S.-allied, nuclear-armed nation.
The barrage of bombs and bullets left 37 people dead, including seven senior officers and 17 children.
The deaths of so many top brass inside a heavily fortified area a few miles from the capital was a major coup for the Pakistani insurgents, who are under pressure as the army pushes an offensive against their stronghold of South Waziristan along the Afghan border.
Friday's carnage also dramatized the risks Pakistan faces if it steps up its support for the United States in the war against Islamic extremists on its side of the border with Afghanistan.
President Barack Obama believes Pakistan is a key partner in that war, but critics contend that Pakistan, hedging its bets in the event the Taliban eventually regain power in Kabul, has held back against Afghan insurgents who use the lawless border region as a safe haven.
The attack on the mosque, which was largely reserved for military families, was the latest in a relentless Taliban onslaught against mostly military targets across Pakistan. It came nearly two months after the brazen siege of the army headquarters on Oct. 10, when insurgents held dozens hostage in a 22-hour standoff that left 23 people dead including nine militants.
By targeting a packed mosque during Friday prayers, the militants showed they cared little about igniting a possible backlash in this overwhelmingly Muslim country. Authorities urged clerics who had so far avoided publicly criticizing the militants to do so.
The attack began shortly after 1:30 p.m. when the assailants lobbed hand grenades to break through a checkpoint close to the mosque, said Yasir Nawaz, a police official at the scene.
Witnesses said two of the militants then stormed the mosque, while others ran into buildings nearby.
They wore suicide belts under traditional baggy Pakistani clothes, lobbed grenades and sprayed automatic weapons at worshippers.
"They were killing people like animals," witness Nasir Ali Sheikh. "Whoever they saw they shot at. They were well trained and moved very quick."
At least four attackers took part in the attack, which left the walls of the mosque smeared with blood and victims lying on abandoned prayer mats.
Security forces exchanged fire with the assailants for an hour, killing them or watching them blow themselves up. Reporters were prevented from getting close as helicopters hovered overhead and trucks carrying commando teams and ambulances raced to the scene.
The dead in Friday's attack included a major general, a brigadier, a colonel, two lieutenant colonels, one major and a retired major as well as three regular soldiers, military spokesman Maj. Gen. Athar Abbas said. Seventeen children _ 11 of them army kids _ and 10 civilians also were killed.
Another witness, Ameeruddin Sheikh, cried when describing the corpse of a young boy.
"He was hardly 12 or 13 years of age. His face was fresh and blood was all over his body. His eyes were open and it was as if they were asking all of us what kind of jihadis would kill people when they were praying."
Many of the military families who use the mosque, which had about 150 worshippers, live in army housing close by. Residents said that to enter the mosque people need to show military identification and were frisked by guards.
The commander of the Pakistani Taliban in South Waziristan claimed responsibility for the attack in a call to the BBC's Urdu service, saying the mosque was targeted because it was used by the army. A military spokesman said he was aware of the claim.
The army launched the South Waziristan offensive in mid-October, pitting some 30,000 troops against about 10,000 militants. It has been more successful than many people expected and the soldiers now control what was once a sanctuary for local and foreign al-Qaida militants. Many of the insurgents _ including their leaders _ appear to have fled to other parts of the lawless border area.
The army has so far enjoyed broad public support for the offensive.
But the repeated Taliban attacks risk hurting the country's resolve as well as the morale of the army's poorly paid rank and file. Some politicians and many ordinary Pakistanis believe the government should negotiate with the militants _ not fight them _ and blame the United States for pressing Islamabad to act.
The United States is unable to send troops into the border region, but has struck at militants over the last year with at least 60 missile strikes at targets there. The attacks have scores of alleged insurgent commanders but fueled anti-American sentiment.
U.S. officials said Friday they were considering increasing the frequency of the missile strikes and expanding them to the western province of Baluchistan, something that would likely prompt a furious response from Pakistani officials and strain already tense U.S.-Pakistani ties.
Associated Press writers Munir Ahmad and Zarar Khan in Islamabad and Lolita C. Baldor in Washington contributed to this report.