The blaze was the latest in a series of industrial disasters over the last several years in Bangladesh. At least 50 people were injured in Saturday’s fire, said Mozammel Hoque, a deputy director of the fire service.

The cause of the explosion was unclear, he added.

The blast occurred at 6 a.m. at the Tampaco Foils factory in an industrial park in Tongi. The factory makes, among many other things, foil for cigarette packs for British American Tobacco and snack-food packaging for Nestlé.

By Saturday evening, firefighters had not yet completely extinguished the blaze. They tried to rescue anyone still trapped inside.

“There’s definitely still people inside,” Mr. Hoque said around noon on Saturday. “So far, we’ve only been finding dead bodies, no one who was still alive.”

In the aftermath of the Rana Plaza collapse, broad structural and fire safety reforms were put into effect, and global apparel companies agreed to help Bangladesh with fire safety and building improvements. But building safety in other industries has attracted less scrutiny.

“Experience shows us that, unless there is international public pressure, corporations operating in Bangladesh do not take action to protect worker safety,” said Scott Nova, the executive director of the Worker Rights Consortium. “Outside the garment sector, there has not been much pressure, largely because corporations in the U.S. and Europe have not been linked to mass-fatality disasters.”

Outside Tampaco Foils, onlookers gathered — many of them looking for missing relatives who worked at the factory.

“We thought it was a plane crash,” said Sojib Babu, who lives in the neighborhood and heard the explosion. He held a picture of his brother, who had arrived for his shift 15 minutes before the explosion, on the last day of work before Eid al-Adha holidays.

“We’ve already gone to the hospitals and looked at the bodies that have been found so far — none of them match. Looking at how the fire is still going, it’s hard to believe he might be alive,” Mr. Babu said, choking up.

As rescue efforts continued and strong winds stoked the smoke and flames, Mr. Hoque said firefighters were trying to prevent any further explosions, adding that the building could collapse.

“We’re having to be very careful, because there are a lot of chemical drums inside,” he said. “They could catch fire anytime.”

Nida Najar contributed reporting from New Delhi.

A version of this article appears in print on , on Page A8 of the New York edition with the headline: 23 Are Dead in Boiler Blast at a Factory in Bangladesh. Order Reprints | Today’s Paper | Subscribe