Pakistan has admitted carrying out "intelligence-based anti-terrorist operations" in Afghanistan after the Taliban accused it of killing eight women and children.
No exact details were provided on the operation in an official statement.
However, it did say it was in response to a militant attack which left seven Pakistani soldiers dead on Saturday.
The Taliban has denied any link to the militants, adding that the "reckless" strikes had hit "civilian homes".
Zabihullah Mujahid, a spokesperson for the Taliban government, warned Pakistan not to "blame Afghanistan for the lack of control and problems in its own territory" in a statement released on X (formerly Twitter).
"Such incidents can have very bad consequences which will not be in Pakistan's control," he added.
Tensions have been rising between Afghanistan and Pakistan since the Taliban retook control of the country in 2021.
Pakistan says it has been dealing with a rising number of militant attacks, and on Monday accused "certain elements among those in power" of "actively patronising" militant group Tehrik-i-Taliban Pakistan (TTP), and of "using them as a proxy against Pakistan".
Monday's statement said the target of the operation had been another group, Hafiz Gul Bahadur, which Pakistan accuses of attacking the military post close to the Afghan border in north Waziristan.
Pakistan's President Asif Ali Zardari had already vowed to "respond strongly" to the troops' deaths, "regardless of who it is or from which country" the group came from.
President of Pakistan Asif Ali Zardari attended the funerals of two of those killed on Saturday
But Taliban spokesperson Mr Mujahid said the 03:00 (22:30 GMT) attack in Khost and Paktika had killed five women and three children.
It later said it had fired at Pakistani troops stationed along the border.
Late last year, Pakistan forced hundreds of thousands of Afghans to leave Pakistan, saying they did not have the correct paperwork to stay. Human rights groups criticised the policy, saying it resulted in many refugees and asylum seekers being coerced into leaving.
Caretaker ministers at the time suggested that this was done because of security concerns. Some analysts have suggested groups have taken advantage of the Taliban's return, but the Taliban has denied hosting militant groups, AFP reports.