The Pakistani Army said six militants and two government soldiers were killed in a gunbattle in the tribal areas bordering Afghanistan.
The army said the firefight on June 23 occurred in the South Waziristan tribal district, where the Pakistani Taliban are active.
The army said troops also seized weapons and ammunition in the village of Spina Mela.
The Pakistani Taliban in a statement claimed that its fighters killed three government soldiers.
The Pakistani Taliban are waging a deadly insurgency against Pakistan.
The militant group had sanctuaries in the tribal areas until a 2014 Pakistani Army offensive, after which most of the militants escaped to Afghanistan. They continue to carry out sporadic attacks.
With reporting by AFP