DHAKA, Bangladesh -- Authorities in Bangladesh on Friday ended a search for bodies or survivors from the collapse of the roof of a five-story building that killed seven people.

The search was called off after the death toll rose to seven, said M. Jahangir Alam, the local chief government administrator in Mongla in Bagerhat district, where the factory was located.

Initially, there was confusion over how many people may have been trapped under rubble after Thursday's accident, but authorities said Friday there had been no more bodies or survivors found.

Police initially said that the building was being built to use as a factory, but later the military, which owns it, clarified that it was to be used as a warehouse.

About 150 people were working in the building when the collapse happened 135 kilometres (85 miles) southwest of Dhaka.

The cause of the collapse was under investigation.

A statement by the military's Inter-Service Public Relations office said late Thursday that it had awarded the construction work to China National Building Material Company Ltd., but that the Chinese company had sub-contracted a local agent to build the roof.

Building structural safety is a problem in Bangladesh, with engineering surveys showing that many factories violate building codes by using substandard materials or adding extra floors that the building foundations can't support.

In April 2013, a building housing numerous garment factories collapsed in Dhaka, killing more than 1,100 people.