The disaster is Italy's most deadly rail accident since January 2005, when 17 people were killed in a collision.
Guido Bertolaso, head of Italy's civil protection agency, said on Tuesday that the area was still dangerous.
"We have a convoy with four train wagons that are still carrying liquefied petroleum and are off the tracks, on their sides ... so the area is still at a really high risk level
because the fire is still smouldering," he said.
Videos uploaded on YouTube showed a huge fire and smoke towering above Viareggio's low houses.
An inferno raged throughout the night, gutting buildings and cars, while the sound of sirens and explosions pierced the air.
Risk of explosions
The train derailed just before midnight on Monday shortly after passing through Viareggio's train station en route to Pisa from the northern city of La Spezia, Gargiulo said.
The train's two engineers were only lightly injured and were questioned in hospital over the incident.
They said they felt an impact about 200 metres outside the station, shortly before the rear of the train went off the tracks, Gargiulo said.
The incident may have been caused by damage to the tracks or a problem with the train's braking system, he told the Associated Press news agency.
The fire was being contained but there was still a risk that other train cars containing gas would explode, Antonio Gambardella, the head of a team of firefighters, told RAI.
Hazardous materials teams specialised in dealing with nuclear, biological and chemical threats were being brought in to help.