Pakistani security officials say militants have ambushed an army vehicle on patrol in a northwestern tribal region, killing seven soldiers before fleeing back to neighboring Afghanistan.

The two officials say the attack took place Sunday in North Waziristan.

The officials spoke on condition of anonymity Monday because they were not authorized to speak to reporters.

Hours after the attack, Mohammad Khurasani, a spokesman for the Pakistani Taliban, issued a statement claiming responsibility.

While Pakistan's military has cleared over 90 percent of the North and South Waziristan tribal regions from insurgents, violence has continued there.

The army has been constructing a series of fences along the border with Afghanistan to check the movement of militants.