On an intelligence input, police's special SWAT unit, elite anti-crime Rapid Action Battalion (RAB) and detectives jointly raided a seven-storey apartment building in Kalyanpur area and the militants attacked them from upstairs, leading to a fierce gunfight.
The nine militants were killed after an hour-long gunfight while another another extremist who received bullet wounds was arrested, police said.
Inspector general of police A K M Shahidul Hoque told reporters that militants were suspected to be members of homegrown extremist group JMB blamed by the government for the July 1 cafe attack in which 22 people, mostly foreigners were killed.
Dhaka's joint police commissioner Sheikh Maruf Hassan said the special raid named 'Operation Storm 26' was launched at 5.51 am local time at a house called Jahaz Building cordoning off the nearby thoroughfares at the area and it continued for around one hour.
Also Read
The Islamist gunmen wearing black tunics, turbans and carrying backpacks exchanged fire and shouted "Allahu Akbar" (God is the Greatest), reports said.
According to local media reports, the arrested militant, who is being treated at a hospital in the capital, admitted that the group was inspired by ISIS when police quizzed him at the facility.
He said the militants had been planning another large-scale assault.
Hoque said police found no evidence of their ISIS link but security analysts earlier said JMB was ideologically inclined to the Syria-based outfit which claimed the responsibility of the July 1 attack.
'Jahaz Building' is a residential apartment complex for middle income people who lived in most of the flats with family members but two floors of the structure were rented out to students and some youths.
Twenty two people, including an Indian girl, were killed by suspected ISIS militants inside a cafe popular with expats in the diplomatic zone in Dhaka in the worst terror attack in Bangladesh before commandos launched an assault, killing six attackers and capturing one alive.