It was reported that the gunmen entered the area wearing uniforms.
The attack was the third major militant assault in a week following the government's plan to launch an offensive against Islamic militants along the rugged mountains of Afghanistan border.
Mohammed Jamil, a police official said that shortly before noon, the attackers tried forcing their way through the army compound as the soldiers tried stopping them.
He added that jumping out of the vehicle, the attackers spread throughout the area and began firing at the troops.
A senior military official on conditions of anonymity said one gunman hurled a grenade while others fired at those, who were managing the checkpoint.
He said top army officials were trapped inside the compound.