The death toll from the collapse of a building in Tanzania's commercial capital Dar es Salaam has climbed to 17, a senior government official has said.

The building of more than 12 storeys, which had been under construction, collapsed on Friday morning near a mosque in the Kariakoo district around the city centre.

"Eighteen people survived the collapse of the building, but the search for more survivors continues," Dar es Salaam Regional Commissioner Said Meck Sadick, confirming the latest death toll, said.

He said that the rescue operation had run through the night and would continue until everyone was accounted for.

"There is still a lot of work to be done. There is a lot of rubble that still has to be removed."

Several cars were crushed by falling masonry.

Jakaya Kikwete, the Tanzanian president, who visited the scene on Friday, ordered authorities to take action against responsible parties.

Police officials said four suspects had been arrested, including the building owner and contractor.

"I thought there was an earthquake and then I heard screaming. The whole building fell on itself," witness Musa Mohamed said.

Piles of rubble

Scores of people were reportedly working in and around the building at the time of the incident at around 8:45am local time (05:45 GMT). 

Residents told AFP news agency that during normal working days, the area bustles with activity from a mix of business people, passers-by and playing children.

"My children normally come to play here during Sundays and holidays. I am not sure whether they are also trapped," one desperate local resident Elizabeth Richard said.

Next to her, rescue workers were dragging out pieces of wood, iron rods, chunks of sand and bricks from the 20-metre high piles of rubble with the hope of locating more survivors.

"I was terribly shocked with the strange noise," said Ramadhan Issa, a taxi driver who was having tea at a nearby restaurant at the time of the disaster.

Saidi Mecky Sadiky, the Dar es Salaam regional commissioner, said up to 60 people, including workers, food vendors and children could have been around the area, which has a mix of both commercial and residential developments.

Source: Agencies