The initial attack, which lasted about 90 minutes, illustrated the breadth of the militants’ ability to launch attacks virtually anywhere in the violence-racked Muslim nation — even the epicenter of Pakistan’s vaunted security establishment.

According to authorities, the gunmen drove up in a white van to a perimeter checkpoint outside the army’s headquarters in Rawalpindi, a garrison city adjacent to Pakistan’s capital, Islamabad. Armed with automatic rifles, the gunmen opened fire on guards, jumped out of the van, then took positions outside a second checkpoint. Some of the dead security forces are believed to have died in that initial exchange of gunfire.