KARACHI, Sept 12— Fire ravaged a textile factory complex in the commercial hub of Karachi early Wednesday, killing almost 300 workers trapped behind locked doors and raising questions about the woeful lack of regulation in a vital sector of Pakistan’s faltering economy.
It was Pakistan’s worst industrial accident, officials said, and it came just hours after another fire, at a shoe factory in the eastern city of Lahore, had killed at least 25.
Flames and smoke swept the cramped textile factory in Baldia Town, a northwestern industrial suburb, creating panic among the hundreds of poorly paid workers who had been making undergarments and plastic tools.
They had few options of escape — every exit but one had been locked, officials said, and the windows were mostly barred. In desperation, some flung themselves from the top floors of the four-story building, sustaining serious injuries or worse, witnesses said. But many others failed to make it that far, trapped by an inferno that advanced mercilessly through a building that officials later described as a death trap.
Rescue workers said most of the victims died of smoke inhalation, and many of the survivors sustained third-degree burns. As firefighters advanced into the wreckage during the day, battling back flames, they found dozens of bodies clumped together on the lower floors.
One survivor, Muhammad Aslam, said he heard two loud blasts before the factory filled first with smoke, then with the desperate screams of his fellow workers. “Only one entrance was open. All the others were closed,” he said at a hospital, describing scenes of panic and chaos.
Mr. Aslam, who was being treated for a broken leg, said he saved himself by leaping from a third-floor window.
Hundreds of anguished relatives gathered at the site, many of them sobbing as they sought news. Some impeded the rescue operation, and baton-wielding police officers tried to disperse the crowd but failed.
“If my son does not return, I will commit suicide in front of the factory,” one woman shouted before news cameras as relatives tried to console her.
The death toll rose quickly. By evening, the Karachi commissioner, Roshan Ali Sheikh, said that 289 people had died, most of them men. The provincial health minister, Sagheer Ahmed, put the toll at 248, which he said was the number of bodies accounted for at major hospitals. The number was expected to rise further.
In the shoe factory fire in Lahore, 25 people were reported killed and dozens wounded. Officials said that blaze had been set off by a generator that caught fire and ignited chemicals stored nearby in the factory, illegally located in a residential neighborhood. Most of the victims were men under 25.
The fires immediately revived long-running questions about the regulation of Pakistan’s manufacturing sector, centered in Karachi, and of the vital textiles industry in particular.
Textiles are a major source of foreign currency for Pakistan, accounting for 7.4 percent of its gross domestic product in 2011 and employing 38 percent of the manufacturing work force. Pakistani cotton products are highly sought in neighboring India and form the backbone of a burgeoning fashion industry that caters to the elite. President Asif Ali Zardari’s government has often called on the United States to drop tariff barriers to Pakistani textile imports, which it says would be preferable to traditional aid.
But the industry suffers from weak regulation, characterized by lax oversight and corruption. Business owners often put profits over safety, workers’ rights advocates say.
On Wednesday evening the police raided the home of the owner of the Karachi factory, Abdul Aziz, who appeared to have gone into hiding. According to an online business information service, his company, Ali Enterprises, manufactured denim, knitted garments and hosiery and had capital of between $10 million and $50 million.
His nephew, Shahid Bhaila, the chief executive officer of the company, was also being sought for questioning. The police said both men had been placed on the exit control list, barring them from leaving the country.
The Muttahida Qaumi Movement, the most powerful political party in Karachi, announced three days of mourning. The city electricity company said it would cancel all outstanding bills for the families of those affected as a good will gesture.
The cause of the fire remained unclear. Geo News, the largest news channel, speculated that it had been started by extortionists, reporting that Mr. Aziz had previously faced a demand for a shakedown payment of more than $100,000, which he refused.
But others said an electrical fire was more likely. Wali Muhammad, a former electrical inspector, said that most accidental fires are caused by short circuits in equipment. But since 2003, he said, inspectors had been forbidden by law from visiting factories in Karachi and Punjab; it was not immediately clear why.
“This is criminal negligence,” he told Geo News, referring to the ban.
Another mystery surrounded the locked factory doors. Some survivors said the exits had been shuttered to prevent workers from slipping out early; others said it was the consequence of a recent break-in.
A majority of the garment workers came from Orangi Town, a poor working-class neighborhood in Karachi. Seventeen of the victims came from the same street, local news media reported.
The factory building suffered severe structural damage in the blaze, and officials feared it would collapse on rescue workers during the day.
While many distraught family members set up camp near the factory, others moved between city hospitals, seeking news of loved ones. One man said he was looking for his cousin, who earned $70 a month as a cashier. “He’s still missing. I’m afraid he may have been working in the basement,” the man said.
The Human Rights Commission of Pakistan called on the government to mount an immediate investigation. “The head of the firefighting operations in Karachi has noted that the factory was dangerous, flimsily built and had no emergency exits,” said Zohra Yusuf, chairwoman of the rights group. “Why did all of that escape official attention earlier?”
Workplace safety is guaranteed under Pakistan’s Constitution, but labor leaders say that government oversight has crumbled rapidly in recent years, along with a general decline in governance.
Sharafat Ali of the Pakistan Institute of Labor Education and Research, a labor rights group, said that 151 workers died in accidents in 2011. The state was partly responsible for the deaths, he said, because its civil servants “silently and criminally allow violation of laws and regulations established to ensure health and safety provisions at work.”
Waqar Gillani contributed reporting from Lahore, Pakistan.