At one stage, he said, the suspected militants opened fire and threw bombs at the elite forces, prompting them to retaliate around 4 am.
Sensing danger, the militants exploded several grenades inside the house, said Mahmud.
A bomb disposal unit from Dhaka reached the spot in the morning.
The deceased were said to be the members of the banned militant outfit Jama'atulMujahideen Bangladesh (JMB), said Shafayat.
A man, identified himself as a worker of KSRM re-rolling mills, rented out the house on September 29, said Shafayat.
One AK 22 riffle, three pistols, five unexploded grenades were recovered from the house.
photo shows suspected militant den: Photo: UNB
Mazharul Islam Chowdhury, a local trader, purchased a land with a tin-shed house from local people a few days ago.
Rab also detained the house owner and its caretaker for interrogation.
Details of the incident will be made clear once the drive of bomb disposal unit is over, said Mufti Mahmud Khan.