The fight took place during an intelligence-based operation against militants in Malikabad area of Swabi district of the province, army said in a statement.
"The exchange of fire is ongoing and the compound has been cordoned off," the statement added.
The killing of soldiers came a day after six soldiers were killed in attacks by militants from Afghanistan.
Army said that in punitive response, at least 15 attackers from Afghanistan were killed.
Pakistan last month launched Operation Raddul Fasaad to clean the country of remnants of militants after dismantling their hideouts in remote tribal region.
Disclaimer: No Business Standard Journalist was involved in creation of this content
