A sprinkler system has saved a Christchurch bedding factory from severe damage after a chemical explosion overnight.

Firefighters were called to Comfort Technologies in Treffers Rd, Wigram, about 10.40pm yesterday when the sprinkler system went off following a minor explosion.

When they got there they found the sprinklers had put the fire out, said Fire Service southern communications acting shift manager Daryl Ball.

The majority of damage was caused by flooding from the sprinklers, but if they were not there, the damage would have been far more extensive, he said.

"They do work," Mr Ball said.