BERWICK (AP) — Fire officials say a puppy was responsible for causing an apartment fire in Berwick that displaced five families and left one man severely burned.

Assistant Fire Chief Bruce Plante says the blaze broke out around 3:45 a.m. Sunday after a puppy knocked over a burning candle in the first-floor unit of an apartment building on Berwick Road. The flames quickly spread after the candle ignited a quilt and mattress in the apartment.

A man who lived in the residence suffered serious burns and was transported to Massachusetts General Hospital in Boston. His injuries are not believed to be life-threatening. He was not identified.

It took more than two hours for firefighters from 17 departments to extinguish the blaze. Plante says the building is likely a total loss.