Islamabad, Pakistan (CNN) -- Several hundred militants attacked a military checkpoint in Orakzai Agency in Pakistan's tribal region early Monday, killing two security personnel and wounding eight others, a government official said.
Thirty-two militants died in the attack on the checkpoint in the area of Shareen Dara, Sajjad Ahmed said.
The attack came a day after Taliban spokesperson Azam Tariq told CNN the militant group had officially declared war against the United States and its allies, especially the Pakistan military, which has stepped up its efforts against militants in Orakzai Agency since mid-March.
Orakzai is one of seven semi-autonomous tribal agencies along the 1,500-mile porous border that Pakistan shares with Afghanistan.
On Sunday, militants planted explosives in a boys' school in Mohmand Agency, bringing to 40 the number of schools they have destroyed in the area, authorities said.
No one was hurt in the attack.
Journalist Nazar Ul-Islam contributed to this report.