KARACHI, Pakistan — The towering metal door at the back of the burned-out garment factory could have been an escape for many of the low-paid textile workers caught in the fire here on Tuesday. Instead, it stands as a testament to greed and corruption at a factory where 289 trapped employees died.

As hundreds of workers scrambled to escape the flaming factory after a boiler explosion, they found the main sliding door — 30 feet high, big enough for a truckload of cotton — firmly locked. Instead of letting the workers escape, several survivors said Thursday, plant managers forced them to stay in order to save the company’s stock: piles of stonewashed jeans, destined for Europe.

“They prevented people from leaving, so they could save the clothes,” said Shahzad, a stone-faced man in sweat-drenched clothes, standing in the blacked corridors of the factory.

His voice trembling, Shahzad, who goes by just one name, said he had already recovered the body of a 15-year-old cousin; now he was looking for his 23-year-old brother, Ayaz. He figured he was buried under the mounds of ash and twisted metal.