Officer Iqbal Hossain said the gunfight took place around noon when contingents of police, acting on a tip-off, raided a hillside den of the suspects in the Hoaikyong area of Cox's Bazar district, located nearly 350 kilometres south-east of the capital Dhaka.
Sensing the lawmen's presence, Hossain said, the gang members fired their guns, prompting police to retaliate with bullets, leaving four of them dead at the scene.
The gunfight lasted for more than an hour, he added.
District police chief Masud Hossain said the deceased belonged to the Rohingya Muslim community mostly from Myanmar living in sprawling refugee camps after they fled persecution in neighbouring Buddhist-majority Myanmar.
They were members of an organised gang and accused in many criminal cases included murder, robbery and drug smuggling in and around the camps, he said.
Police found four guns, 20 bullets and 40,000 yaba pills at the scene after the gunfight, he added.
Yaba is sedative made of the mixture of methamphetamine and caffeine and smuggled into Bangladesh from Myanmar.
Bangladesh has been hosting more than 1 million Rohingya Muslims in 32 refugee camps in the south-eastern district bordering Myanmar.
Of them, nearly 750,000 crossed the border after Myanmar's military launched a crackdown against the ethnic minority group in August 2017.
In March, seven other suspected bandits were killed in a gunfight with the Rapid Action Battalion, a special unit of the Bangladesh police, near a refugee camp in neighbouring Teknaf sub-district. - dpa