Security forces repulsed terrorist attacks from across the Pak-Afghan border, killing a total of six "terrorists" in two separates areas of Khyber Pakhtunkhwa and Balochistan, Inter-Services Public Relations (ISPR) reported on Sunday.

According to the military's media wing, the attacks targeted border posts and border fencing parties in the Bajaur area of KP and the Qamar Din Qarez area in Balochistan. Security personnel have foiled seven infiltration attempts in the Bajaur area alone during the last 24 hours, it added.

Take a look: Pakistan, Afghanistan in angry tangle over border fence

"Four security personnel and a soldier of the Pakistan Air Force, deployed at an observation post, got injured during the exchange of fire," read an ISPR press release.

"Taking advantage of ungoverned spaces and [with] facilitation [from] inside Afghanistan, terrorists are resorting to such attacks to prevent fencing and construction of border posts," it added.

Meanwhile, a senior security official who declined to be named, told DawnNewsTV that over 30 terrorists from the outlawed Tehreek-i-Taliban Pakistan (TTP) attacked the Frontier Corps check post located at the border.

Pakistan’s military has so far fenced off more than 43km of the frontier with Afghanistan. The military has also planned to recruit tens of thousands of new troops to man the border. It is not clear how long it will take to fence the entire boundary.

Authorities in Pakistan consider the fence mandatory for restriction of the movement of terrorists from across the country.

However, the government in Kabul has been opposing the move.

With additional reporting from Syed Ali Shah.