"Pakistani troops at the post effectively responded to the fire. Terrorist fled back to Afghanistan," the army said in a statement late Friday.
Jamaat-ul-Ahrar (TPP JA), a splinter group of the outlawed Tehrik-e-Taliban Pakistan, claimed responsibility for the attack.
The army statement did not say anything about casualties.
Spokesman for the TTP JA group Asad Mansoor said two of its fighters were killed and three injured in clashes with the Pakistani troops.