The fighting occurred in Bara area of Khyber tribal region bordering Afghanistan.
According to security sources, troops signalled some motorcyclists to stop in the area. However, the motorcyclists began firing and tried to flee.
The security forces retaliated, killing three militants and injuring three more. Two security personnel were injured in the shootout.
Security sources said militant commander Memon Afridi was among the dead.
In Peshawar, police arrested at least 25 suspects during a search operation in Bhana Mari and surrounding areas. Police seized eight pistols, a Kalashnikov assault rifle and hundreds of bullets during the operation.