PESHAWAR, Pakistan — Pakistan’s military on Tuesday said a soldier was killed in the country’s northwest by fire from across the Afghan border, a sign of increasing violence in an area that until recent years served as a base for Pakistani and foreign militants.

The attack late Monday hit a border security post in Bajur district, a former tribal region of Khyber Pakhtunkhwa province. The military statement said the shooting came from the Afghan side of the frontier and provided no further details.

The brief statement said Pakistan “has been consistently raising the issue for border management on other side to avoid use of Afghanistan soil against Pakistan.”

The two sides often accuse each other of turning a blind eye to militants operating along the porous frontier, which stretches 2,400 kilometers (1,500 miles) across rugged mountainous terrain.

In July, Pakistan said militants killed a soldier in a cross-border attack on a security post in Bajur district.

That same month, a United Nations report said more than 6,000 Pakistani insurgents were hiding in Afghanistan, most belonging to the Pakistani Taliban. Also known as Tehreek-e-Taliban Pakistan, they are a separate insurgent group from the Afghan Taliban, although Pakistan’s militant groups are often interlinked with those across the border in Afghanistan.

Pakistan’s border areas served as a base for the Pakistani Taliban and other militants until a few years ago, when the army said it cleared the region of insurgents, but occasional attacks have continued.

Such attacks have raised fears that the Pakistani Taliban are regrouping. Last week, the insurgents released a statement asking residents to vacate the former tribal regions of Khyber Pakhtunkhwa province, as the group plans to launch more attacks on security forces.

On Saturday, two Pakistani soldiers were killed in a shootout with militants during a search operation in the province’s North Waziristan district, around 160 kilometers (100 miles) south of Bajur district.

Earlier this month, the Pakistani Taliban took responsibility for a powerful roadside bombing in North Waziristan that targeted a military vehicle, killing three soldiers and wounding four.

Pakistan and Afghanistan share an internationally recognized border known as the Durand Line, which was drawn in the 19th century when the British dominated South Asia. Kabul has never recognized the boundary.

Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.