The head of the Red Crescent rescue operation said an emergency exit was blocked and firefighters arrived some two hours after the blaze began Saturday morning.
"I don't think we realized how big the fire was," the Red Crescent official, Jawad el-Mejdoubi, said in the emergency ward of Ibn Rochd Hospital. "Twisted bodies, faces disfigured by fire."
The fire in an industrial area on the edge of the sprawling city, Morocco's chief port and economic capital, appeared to be the North African kingdom's worst since a blaze killed 50 prisoners in a jail in 2002.
An angry crowd outside the four-story building accused the factory owner of blocking the doors and emergency exit.
Interior Minister Chakib Benmoussa said an investigation into the cause of the blaze would also examine security measures and work conditions at the factory, the MAP news agency reported.
The minister said that chemicals in the building sent the blaze out of control and delayed the rescue effort by hours.
Firefighters said many victims were trapped in the spiral stairwell of the building. A 29-year-old worker who managed to escape said many deaths occurred on the third floor, where women sewed.
"We ran to the door. It was blocked, to the elevator, it was blocked. Then ... the lights went out," the woman, Rachida Darif, told The Associated Press.
She saved herself by crawling through a space to the roof, then jumping down from a neighboring building that was under construction. She used a construction cord to lower herself part way, she said.
Morocco's city government said 55 were killed and a dozen injured, MAP said. A fire official helping with the rescue said that 54 people had been killed 21 women, 28 men and five others whose bodies were too charred to identify their sex. He said up to 24 were injured. The fire official was not authorized to speak publicly and asked not to be identified.
About 100 people were in the factory when the fire broke out, MAP said.
Some 80 Red Crescent rescuers joined an estimated 200 firefighters battling the blaze, which was tamped out within three hours but soon rekindled. More than eight hours after the fire started, firefighters used a crane to hose down the smoking rubble.
Police dogs and seismic equipment were brought in to locate victims but the heat and smoke kept the dogs at bay for hours.
MAP said that King Mohammed VI had ordered that no effort be spared to bring aid to victims and console their families. Hospitals with burn units, including the military hospital in the capital, Rabat, were ordered to mobilize their resources for the injured.
The bustling coastal city of Casablanca is Morocco's leading port and the economic capital. It reflects the contrasts of Morocco, the world's westernmost Muslim country, with its rich modernity and poor, crowded neighborhoods with soaring unemployment.
The 2002 fire that killed 50 people at the overcrowded Sidi Moussa prison in the Atlantic coastal town of El Jadida was caused by a short circuit but made deadlier by fumes from burning mattresses.