ANGORE ADDA, Pakistan (AP) — Pakistan's military said Wednesday that new fencing and guard posts along the border with Afghanistan would help prevent militant attacks in both countries, but the stepped-up fortifications have angered Kabul, which does not recognize the frontier as an international border.

Maj. Gen. Nauman Zakaria, the commander for the South Waziristan tribal region, told reporters during a visit to the border that after the fencing is complete, no "terrorist" will be able to use Afghan or Pakistani soil to launch cross-border attacks. Pakistan began construction of the fencing in June.

Standing at a post overlooking Afghan villages across the border, Zakaria said troops and paramilitary forces had defeated militants by launching several operations in the troubled region, which was a longtime stronghold for al-Qaida and the Taliban, as well as criminal gangs.

President Donald Trump has reiterated longstanding U.S. accusations that Pakistan turns a blind eye to militant groups that launch attacks in Afghanistan from within its territory, allegations denied by Islamabad. Afghanistan has leveled similar accusations, and has also objected to the building of the border fence.

The two nations are divided by the 2,400-kilometer (1,500-mile) Durand Line, drawn by British rulers in 1896. Kabul does not recognize it as an international border, causing friction between the two neighbors, with Pakistan suggesting Afghanistan has designs on part of its territory. The line runs through ethnic Pashtun territory, dividing families and tribes between the two countries.