At least 16 people have died after a huge fire broke out at a garment factory in Bangladesh, with officials warning that the toll could rise.

Sixteen bodies have been recovered and would be handed to families after DNA testing, as they have been burnt beyond recognition, the fire service said.

Distraught relatives gathered outside the four-storey factory in Dhaka's Mirpur area on Tuesday in search of their loved ones still missing.

The blaze, which broke out at the factory around midday, was extinguished after three hours. But an adjacent chemical warehouse continued to burn, authorities said.

Large fires are relatively common in densely populated Bangladesh, often due to lax safety standards and poor infrastructure. Hundreds of people have been killed in fires in recent years.

Up until 21:00 local time (15:00 GMT) on Tuesday, the fire at the chemical warehouse in Mirpur had not been completely doused, media reports said. Fire service officials have not ascertained which of the two buildings caught fire first.

According to eyewitnesses, the chemical warehouse stored bleaching powder, plastic, and hydrogen peroxide, all of which can intensify fires. Plastic also releases toxic fumes when burned.

Most of the deaths were caused by toxic gas and the building's roof door being locked, the fire service said. Fire service director Mohammad Tajul Islam Chowdhury told local media the victims probably died instantly after inhaling highly toxic gas.

Police and military officers are still trying to locate the owners of the factory and the warehouse. An investigation into whether the warehouse was operating legally is also ongoing.

The fire service said that the chemical warehouse had no fire safety clearance or license from their department. Officials had confirmed that the warehouse had no occupancy certificate or license to operate.

Tearful family members stood outside the charred buildings, many of them clutching photographs of their missing relatives. Among them is a man searching desperately for his daughter, Farzana Akhter. When I heard about the fire, I came running. But I still haven't found her... I just want my daughter back, he told Reuters news agency.

Bangladesh has a long history of deadly industrial disasters, including a fire at a food and drink factory in 2021 that left at least 52 people dead, and the infamous Rana Plaza collapse in 2013 that killed more than 1,100 people.