Pakistan said it targeted militant hideouts and rejected claims that civilians were targeted.
The Taliban described an "extensive" military operation against Pakistani army positions in response to the strikes.
"In response to repeated provocations, extensive preemptive operations have been launched against Pakistani military positions along the Durand Line," Taliban spokesperson retaliatory operation" began Thursday evening.
Mujahid said "numerous" Pakistani soldiers had been killed and some were also captured. Reuters said it could not independently verify those claims.
In another post on X, Mujahid said, "The cowardly Pakistani army has bombed some places in Kabul, Kandahar, and Paktia. Praise be to God, no one was harmed."
Pakistan has since rejected the Taliban’s account.
The Ministry of Information and Broadcasting said on X that the Afghanistan Taliban's "unprovoked action along the Pakistan-Afghanistan border" was given an "immediate and effective response."
The ministry said Taliban forces had "miscalculated and opened unprovoked fire on multiple locations" along the border in Khyber Pakhtunkhwa province.
The post said the fire was being met with an "immediate and effective response by Pakistan’s security forces."
"Early reports confirm heavy casualties on the Afghan side with multiple posts and equipment destroyed," the ministry said.
"Pakistan will take all necessary measures to ensure its territorial integrity and the safety and security of its citizens."
Pakistani security sources also told Reuters that 22 Taliban personnel had been killed, and several quadcopters were shot down.
The fighting follows Pakistan’s accusations that the Taliban is sheltering TTP militants behind a surge in violence and suicide attacks.
The Afghan Taliban denies the claim. A day before February's strikes, Pakistani officials said they had "irrefutable evidence" that militants were launching attacks from Afghan soil, Reuters reported.