PESHAWAR, Pakistan — A group of militants attacked a security post in a former Taliban stronghold in northwest Pakistan bordering Afghanistan, triggering a shootout that killed four troops and four insurgents, the country's military said Friday.

The overnight attack took place in Makeen, a border town in the former tribal region of South Waziristan, the military said in a statement. It gave no further details, saying only that troops were still searching the area.

No one immediately claimed responsibility for the attack, but the mountainous region served as a headquarters for local and foreign militants until 2017, when the army said it had cleared the region of insurgents following several operations. The region still sees sporadic attacks, mainly targeting security forces.

Such incidents have raised fears that the Pakistani Taliban are regrouping

Pakistan and Afghanistan share a 2,400-kilometer (1,500-mile) internationally recognized border known as the Durand Line, which was drawn in the 19th century when the British dominated South Asia. Afghanistan has never recognized the boundary.

The two sides also often accuse each other of turning a blind eye to militants operating along the porous frontier.