Shaikh Mohir Uddin, Associated Press
A Bangladeshi man wipes the face of one of the workers injured in the collapse of a cement factory roof, after he is brought for treatment at the Khulna Medical Hospital in Khulna, Bangladesh, Thursday, March 12, 2015. About 150 workers were on duty when the roof of a five-story cement factory under construction collapsed Thursday at Mongla in Bagerhat district.

DHAKA, Bangladesh — The roof of a five-story cement factory under construction in Bangladesh collapsed Thursday, killing at least four workers and trapping many others, an official said.

About 150 workers were on duty when the collapse occurred in Mongla in Bagerhat district, fire official Mizanur Rahman said.

He said at least 40 people were rescued from under the debris and up to 40 others were feared trapped. Many of the survivors were hospitalized with injuries, Rahman said.

The cause of the collapse was still under investigation.

Survivors said 50-60 people were working on the roof while others were on the ground floor when the collapse occurred, local government administrator M. Jahangir Alam said. It was not clear how many were directly affected by the collapse.

The seaside factory, about 135 kilometers (85 miles) southwest of Dhaka, is owned by an army welfare organization, the United News of Bangladesh news agency reported.

In April 2013, a building housing garment factories collapsed in Dhaka, killing more than 1,100 people. Engineering surveys show that many Bangladesh factories violate building codes by using substandard materials or adding extra floors that the building foundations can't support.