The militants were trying to enter Tehsil Gatki but were killed in the exchange of fire during a raid by the security personnel, officials said.
One of the militants opened fire at the personnel and was shot dead in retaliatory action, while another blew himself up, they said.
A huge cache of arms and explosives were seized from them, the officials added.
The bodies of the militants were moved to Headquarters Hospital in Khar.
Also Read
Bajaur is an agency of the Federally Administered Tribal Areas (FATA) of Pakistan. It is the smallest of the agencies in FATA.
According to Ministry of States and Frontier Regions, FATA has been the country's worst hit region due to terrorist attacks in the last four years.
A total of 3,062 people have been killed in terrorists attacks in the region since 2013-14, the ministry said in a report.
Disclaimer: No Business Standard Journalist was involved in creation of this content