Fire swept a garment factory outside the capital Thursday, killing 25 people trapped behind locked doors left unattended by gatekeepers, officials and state-run television said.

About 100 others, including four firefighters, were injured in the blaze, which apparently was ignited by an electrical short circuit just after the morning shift had reported for work, authorities said.The work shift consisted of about 150 employees, most of them women.

One survivor said the blaze began when a worker hit an electrical line with an iron rod. The high-voltage spark touched off a massive fire that engulfed the third and fourth floors of the factory, where garments are sewn and cut.

Workers tried flee but were trapped inside because the factory gates were locked and the gatekeepers had left their post, firefighters told reporters.

The dead included the factory owner, 16 teenage girls and eight other people trapped in the building as the fire raged for three hours, authorities said.

"We asked for help from all fire brigade stations," one fire official said. "This was the biggest fire in the garment industries."

The factory that burned, located in Mirpur about 3 miles from Dhaka, is one of about 500 garment plants in Bangladesh that employ some 300,000 people altogether.

The garment trade has flourished in Bangladesh over the past decade, becoming the country's second-largest export industry behind the jute trade. Thousands of women from poor families work in the factories at very low wages.

Government officials said they would form a commission to investigate the cause of the factory fire and assess the losses.