The fight took place yesterday during clearance operation in Spin Qamar area of Khyber tribal district where forces have been battling the rebels since the beginning of the month when operation Khyber-I was launched.
"21 terrorists were killed and several others injured," army said adding that eight soldiers embraced martyrdom during the fierce exchange of fire that ensued during the operation.
Army chief General Raheel Sharif attended funeral of the martyred soldiers held in Peshawar garrison.
Around 100 soldiers have also died in the fight against the rebels so far.
