Pakistani security forces have killed six militants and thwarted seven attempts to target military posts in a northwestern tribal region and a border village in the southwest near Afghanistan.

Five troops were wounded in the two cross-border attacks Sunday in the Bajur tribal region and in the village of Qamar Din Qarez in Baluchistan province.

The military said in a statement Sunday their troops repulsed both attacks.

A security official said Monday the troops who were targeted had been fencing the border to check the militants' movement.

Pakistan since 2017 has been constructing fences along the border with Afghanistan, a move opposed by Kabul.

Afghanistan does not recognize the boundary, known as the Durand Line, which was drawn by British rulers in 1896.