A fire raged through a Bangladesh textile mill, killing at least 51 people late Thursday in the three-story building inside an industrial park, officials said.

The fire injured more than 150 workers, 82 of whom were hospitalized, doctors at Chittagong Medical College Hospital said.

Most victims were women, a doctor said. He declined to give his name as he was not authorized to address the media.

More than 1,000 workers were inside the Bangladeshi-owned KTS Textile Mill, 135 miles southeast of the capital, Dhaka.

The majority managed to leave the burning building on their own, said Abu Tayeb, who represents an association of textile manufacturers and exporters.

The factory had only one main exit, and workers had to scramble through a narrow stairway to escape, Rashidul Islam, a fire official said, quoting survivors.

The explosion of an electric generator and a boiler intensified the fire, and it took firefighters about three hours to bring it under control.