Pakistan's military said commandos are carrying out an operation to free about a dozen soldiers held hostage by militants inside army headquarters.
Army spokesman Maj. Gen. Athar Abbas said most of the hostages have been freed in the operation early Sunday, but operations are still continuing.
Two loud explosions and gunshots were heard from inside the complex close to the capital.
The militants slipped into the complex after they and others attacked it on Saturday, sparking a gunbattle that killed four assailants and six soldiers.
The attack, which left at least 10 people dead, was the third major militant strike in Pakistan in a week and came as the government was planning an imminent offensive against Islamist militants in their strongholds in the rugged mountains along the border with Afghanistan.
Army spokesman Maj. Gen. Athar Abbas said "four or five" assailants were holding between 10 and 15 troops hostage in a building close to the main gates of the complex in Rawalpindi, a city near the capital, Islamabad. He said the building had no connection to any of the country's intelligence agencies. No senior military or intelligence officials were among those being held, he said.
He said special forces had surrounded the building. "They will decide how and when to act," he said, declining to say whether negotiations were going on more than 11 hours after the attack began.
Late Saturday, sporadic gunfire was heard coming from the complex.
The whereabouts of military chief Gen. Ashfaq Parvez Kayani and ISI chief Lt. Gen. Ahmed Shujaa Pasha were not known. Separate army statements said Kayani attended meetings at the headquarters and at the president's office in nearby Islamabad during the day.
The attack began shortly before noon when the gunmen, dressed in camouflage military uniforms and wielding assault rifles, drove in a white van up to the army compound and opened fire, army spokesman Maj. Gen. Athar Abbas and a witness said.
The heavily-armed attackers then took up positions throughout the area, hurling at least one grenade and firing sporadically at security forces, said a senior military official inside the compound.
"There was fierce firing, and then there was a blast," said Khan Bahadur, a shuttle van driver who was standing outside the gate of the compound. "Soldiers were running here and there," he said. "The firing continued for about a half-hour. There was smoke everywhere. Then there was a break, and then firing again."
Abbas said the guards were likely confused by the attackers' uniforms.
After a 45-minute gunfight, four of the attackers were killed, said Abbas, who told the private Geo news television channel the assault over and the situation "under full control."
But more than an hour later, gunshots rang out from the compound, and Abbas confirmed that gunmen had eluded security forces and slipped into the headquarters compound in Rawalpindi. The city is filled with security checkpoints and police roadblocks.
On Saturday evening, Abbas said the two men remained holed up in a room near the checkpoint and were surrounded.
"We are trying to finish it at earliest, clear the area of terrorists and restore complete control," he told Dunya TV.
Abbas said six troops were killed and five wounded, one critically. Those killed included a brigadier and a lieutenant colonel, according to a military official, who spoke on condition of anonymity because he was not authorized to speak to the media.
As the attack wore on Saturday, , but several others continued broadcasting.
Khan Bahadur, a shuttle van driver, was standing outside the gate of the compound when the white van pulled up, and shooting erupted.
"There was fierce firing, and then there was a blast. Soldiers were running here and there," he said. "The firing continued for about a half-hour. There was smoke everywhere. Then there was a break, and then firing again."
The audacious assault was the third major militant attack in Pakistan in a week and came as the government said it was planning an imminent offensive against Islamist militants in their strongholds in the rugged mountains along the border with Afghanistan.
Pakistani media said the Taliban claimed responsibility for the attack, and Interior Minister Rehman Malik said the ongoing assaults strengthened the government's resolve to launch the offensive.
"We have been left no other option except to go ahead to face them," he told Dawn television.
The attack came a day after a brazen Taliban suicide attack in Peshawar, the northern frontier city close to the Afghan border, in which at least 50 people were killed and another 100 people were injured.
The attack on Saturday, however, prompted deep anxiety over Taliban militants becoming emboldened by targeting heavily-protected locations, such as the military's main headquarters, while also demonstrating increased sophistication.
The use of military uniforms by the attackers "suggest they are now planning and organizing themselves much more than in the past," a senior Pakistani government official told CBS News' Farhan Bokhari on condition of anonymity. "This is far from an unruly bunch we are dealing with."
Earlier this week, a Taliban militant dressed as a paramilitary soldier walked inside the Islamabad office of the United Nations World Food Program and blew himself up. These two attacks have raised the prospect of militants dressing up as security personnel to access supposedly well-protected locations.
After the Peshawar attack on Friday night, Pakistani security officials warned they expected more suicide attacks by the Taliban in the coming days.
"More attacks could be a retaliation for a likely full-scale military attack on Waziristan," a security official speaking from Peshawar told CBS News on condition of anonymity.
Western diplomats in Islamabad, responding to Saturday's attack, warned that the incident demonstrated a growing Taliban determination to step up violence across the country, amid reports of the military preparing to attack their key locations in Waziristan.
In the past week, fighter jets of Pakistan's air force have attacked suspected Taliban sites in Waziristan, in a campaign described by defense officials as an effort to soften targets ahead of a ground campaign. Waziristan has for years been a place of refuge for militants tied to al Qaeda and the Taliban.
This summer, Baitullah Mehsud, leader of the Taliban movement, was killed in a missile attack thought to have been carried out by unmanned drone operated by the United States. Mehsud's killing has apparently weakened the Taliban's unquestioned unity and may have played a role in the military's decision to attack the region, Western diplomats added.