file photo, Pakistan army soldiers take positions in the Pakistani tribal area of Ditta Kheil in North Waziristan along the Afghanistan border. AP
The Pakistani army's media wing said late Saturday that militants attacked a post in the Datta Khel area of the district of North Waziristan in Khyber Pakhtunkhwa province. The area is a former militant stronghold.
No group immediately claimed responsibility for the attack.
During an intense exchange of gunfire two soldiers were killed, the military said, adding that a search of the area was being carried out to find the militants. It gave no indication of the identity of the attackers.
North Waziristan for years served as a safe haven for militants until the military carried out massive operations to try to clear the area. That forced the militants either to escape across the border into Afghanistan or hide in other mountainous areas near the border. Still, militants often strike against security forces.
Pakistan is holding talks with Islamic militants known as the Pakistani Taliban with the help of the Taliban government in Afghanistan. There is a temporary cease-fire in place.