The deceased were identified as Hossain Mollah, 28, and Al-Amin, 30. Both of them were members of Shamsu Bahini, a notorious gang operating in the Sundarbans.
Members of RAB also recovered 11 firearms and 227 rounds of bullets from the spot.
Adnan Kabir, deputy commanding officer of RAB 8 of Bagerhat, said the gunfight took place between members of the elite force and robbers around 8:15am.
After the gunfight, the bullet-hit bodies of Mollah and Al-Amin were recovered from the spot, Adnan added.