“Save us, brother. I beg you, brother,” Mohammad Altab moaned to the rescuers who could not help him. He had been trapped for more than 24 hours, pinned between slabs of concrete in the ruins of the garment factory building where he worked.

Mr. Altab should not have been in the building when it collapsed on Wednesday, killing at least 238 people.

No one should have.

After seeing deep cracks in the walls of the building on Tuesday, police had ordered it evacuated. But officials at the garment factories operating inside ignored the order and kept more than 2,000 people working, authorities said.

The disaster in Savar, an industrial suburb of Dhaka, the capital city, is the worst ever for Bangladesh’s booming and powerful garment industry, surpassing a fire five months ago that killed 112 people.

Companies operating in the collapsed building say their customers included retail giants such as WalMart, Dress Barn and Britain’s Primark.

After the cracks were reported, managers of a bank that had an office in the building evacuated their employees. The garment factories, kept working, ignoring the instructions of the police, said Mostafizur Rahman, a director of that police force.

Officials said they had made it very clear that the building needed to be evacuated. The Bangladesh Garment Manufacturers and Exporters Association had also asked the factories to suspend their work.

Bangladesh’s junior Minister for Home Affairs, Shamsul Haque, said 2,000 people had been rescued.

The death toll had reached 238 by Thursday night. The garment manufacturers’ group said the factories in the building employed 3,122 workers, but it was not clear how many were inside it when it collapsed.

After the November fire at the Tazreen Fashions Ltd. factory, there were repeated calls for improved safety but little progress. Bangladesh has about 4,000 garment factories and exports clothes to leading Western retailers, and industry leaders hold great influence.

Its garment industry was the third largest in the world in 2011, after China and Italy. The country’s minimum wage is now the equivalent of about $38 a month.

Officials said soon after the collapse numerous construction regulations had been violated. An official with Savar’s engineering department said the owner of Rana Plaza was allowed to construct a five-story building but added another three stories illegally.

Among the garment makers in the building were Phantom Apparels, Phantom Tac and Ether Tex,Wal-Mart said none of its clothing had been authorised to be made in the facility, but it is investigating whether there was any unauthorised production. — AP