The clash occurred in the mountainous region of Swat district where yesterday five militants and two army personnel were killed in a gun battle.
"Those killed were part of Taliban and were planning to carry out attacks in the district," a security official said.
Another official said the dead bodies of the militants were shifted to the District Headquarters Hospital in Swabi for identification.
Pakistan launched operation 'Radd-ul-Fasaad' -- an Arabic word which translates roughly to 'elimination of discord' -- last month after militants killed more than 125 people in a fresh wave of attacks.