Six soldiers and four gunmen have been killed in an attack on Pakistan's army HQ outside the capital Islamabad, the military says.
Troops battled the gunmen after they attacked the heavily armed complex in Rawalpindi in army uniforms. Earlier reports said eight soldiers died.
Officials said one of the dead soldiers was a brigadier, and that two gunmen remained at large.
The attack comes as the army prepares a major operation against the Taliban.
Aleem Maqbool BBC News, Islamabad
The army's main headquarters lies within one of the most heavily secured areas in the country. To attack it in the middle of the day, leaving senior military officials trapped inside, shows a new level of audacity on the part of the militants.
Just a few weeks ago, the government here said it was winning its fight against the militants, and that the Taliban was in disarray. The events of this week will have many questioning those claims.
Speculation that the army will soon launch a ground offensive against the Taliban in the tribal areas of South Waziristan has only left many Pakistanis bracing themselves for more violence in the cities.
It also follows a series of bombings in north-western Pakistan. On Friday at least 50 died in a blast in Peshawar.
The BBC's Aleem Maqbool in Islamabad says that in recent days Taliban positions in the tribal areas have been bombed by the air force, amid speculation that the army's offensive there is soon to be intensified.
There was a period of relative quiet in August after Taliban leader Baitullah Mehsud was killed, but the rate of militant attacks has increased since then, our correspondent adds.
No-one has yet claimed responsibility for the latest attack, but the Taliban has been threatening to carry out attacks unless operations against the militant group were stopped.
Police official Mohammed Jalil told AP news agency that gunmen drove up to the army compound in a white van just before midday local time (0600 GMT).
They took up positions, fired on the compound and threw hand grenades, security officials said.
RECENT MILITANT ATTACKS
24 Sept - Seven pro-government tribal elders killed by militants in town of Janikhel, north-western Pakistan
26 Sept - At least 16 people killed in two suicide car bombs, in Peshawar and Bannu
5 Oct - Suicide bomber attacks UN offices in Islamabad killing five
9 Oct - At least 50 killed in suspected suicide bombing in Peshawar
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.