About 250 people working in the factory in Lower Saxony were evacuated immediately when a tank of sodium hydroxide solution was filled with nitric acid by accident, causing a poisonous gas leak.
More than 800 people living in the area were also initially told to leave their homes. But as the risk zone was enlarged to around 500 metres, the number increased to 1,000 people.
Among them were 400 British soldiers stationed at barracks in the town.
Local authorities provided those who had to leave their homes with emergency accommodation, and around 550 of the 1,200 evacuees slept in a sports hall. The soldiers were taken elsewhere by military police.
Schools and kindergartens in the small town of Bad Fallingbostel, where the incident occurred, stayed shut on Tuesday, and the Autobahn 7 was closed for several hours. It was reopened on Tuesday afternoon.
No one is thought to have been injured, but some locals complained that they did not receive clear information about what to do during the evacuation.
“We are taking criticism on board and will be examining it,” said district administrator Manfred Ostermann.
Heike Hauerken, a spokeswoman for Kraft Foods, said a tank of sodium hydroxide solution was filled with nitric acid by mistake at around 1 pm. The chemicals are used for cleaning.
A reaction started while fire fighters tried to pump the nitric acid out of the tank, producing a poisonous cloud of nitrous gases considered extremely harmful if they come into contact with skin or are inhaled.
There were 14,000 litres of acid in the tank, which soon reached a temperature of 107 degrees Celsius.
Around 1,000 fire fighters and hazardous chemical specialists worked through the night even after the poison gas cloud cleared, as the chemicals in the tank needed to be separated and the risk remained that more toxic fumes could be released.
The scene was likened to a disaster movie, with hundreds of specialists working in protective suits.
Normally, up to 600 people work in the Kraft Food factory, which produces cream cheese, ketchup and mayonnaise.