The deceased were identified as Saddam Hossain, 35, son of Tofail Ahmed and Saddam, 30, son of Sultan Ahmed of Purba Shikdarpara in Teknaf upazila.
Tipped off that two groups of drug traders were exchanging gunfire, a team of police went to the spot around 5 am, said Pradeep Kumar Das, officer-in-charge of Teknaf Police Station.
Sensing presence of the law enforcers, the criminals opened fire on police, forcing them to fire back in self-defense.
After a brief gunfight, police recovered the bodies of two criminals from the spot and sent those to Sadar Hospital morgue.
Three sharp weapons, 20 bullets and 20,000 pieces of Yaba tablets were recovered from the spot.