The gun battle began when militants attacked a police team at Abshar Chowk in Bannu and killing a Frontier Reserve Police personnel.
The policemen chased the militants and killed two of them in an exchange of fire.
One of the dead militants was identified as a nephew of slain Tehrik-e-Taliban Pakistan chief Baitullah Mehsud, who was killed in a US drone strike.
Police said they had found four Kalashnikovs, two pistols, four grenades, two mobiles and ammunition in the possession of the militants.