At least five people were killed and another about 100 feared trapped after a cement factory collapsed in Bangladesh on Thursday, police said.

Soldiers and sailors in the port town of Mongla helped emergency services search through the rubble and pull out more than 40 survivors, officials told Reuters

The factory, run by a subsidiary of the Bangladesh army, was still being built in the town 335 kilometres southwest of the capital, Dhaka, they added.

"Most of the people inside the building were the construction workers including the people who recovered alive ... The recovery efforts are going on very carefully to avoid further risk," Khulna district police chief Nizamul Haque Mollah said.

Fire official Mizanur Rahman told The Associated Press many of the survivors were injured and had been taken to hospital. The cause of the collapse is being investigated.

About 40 survivors were pulled from the debris, and many were treated at local hospitals for injuries. (Shaikh Mohir Uddin/The Associated Press)

Bangladesh has a poor record for building safety.

A complex of shops and small factories collapsed in 2013 killing more than 1,130 people, most of them garment workers.

The collapse of Rana Plaza, built on swampy ground outside the capital, Dhaka, ranked among the world's worst industrial accidents and prompted a global outcry for improved safety in the world's second-largest exporter of ready-made garments.