The blasts lasted several hours at the Gongola Mboto military base.
The city's airport was reported to have been closed after the blasts, the British Foreign Office said.
Residents were encouraged to stay inside their homes and away from windows after the explosions.
Debris was hurled across the city and chief of staff Gen Abdurahman Shimbo said 32 people had died.
Earlier Prime Minister Mizengo Pinda said 17 bodies had been recovered.
Mr Pinda said the explosions had started in one depot before spreading to others in the camp.
By Thursday morning, 23 depots had been destroyed, along with two residential houses and a secondary school.
Mr Pinda told the National Assembly that at least 4,000 people were sheltering at the National Stadium, and warned the death toll could increase.
The British Foreign Office had set up an evacuation centre accepting those within a 10km from the explosion site.
Explosions at an ammunition depot at Mbagala army base near Dar es Salaam in spring 2009 killed at least three people.
Add new comment