The clashes erupted late last night when militants ambushed a security forces convoy that was evacuating injured soldiers from Khajori check post after an attack by a suicide bomber.
"Security forces valiantly responded and encircled fleeing terrorists and inflicted heavy casualties on them. Firefight continued for some time, which resulted in killing of 23 militants," a senior Pakistani military officer said on condition of anonymity.
Three security personnel were injured in firefight.
Local residents said three civilians were killed and several houses destroyed by artillery fire in Mir Ali area.
More From This Section
Khajori check post was targeted by the suicide bomber when soldiers were offering prayers in a mosque. The bomber rammed his explosives-laden vehicle into the post, killing five soldiers and wounding 34 others.
Ansarul Mujahideen, a little-known group linked to the banned Tehrik-e-Taliban Pakistan, claimed responsibility for the suicide attack, saying it was carried out to avenge former Taliban chief Hakimullah Mehsud's death in a US drone strike.