A working smoke detector likely saved the life of a 12-year-old boy Tuesday after an electrical fire broke out in his bedroom while he was sleeping, fire officials say.

Toronto Fire Services Capt. Mike Strapko told CTV.ca the boy suffered minor burns to his legs in the fire but that he and two members of his family were able to escape in time. The boy was taken to The Hospital for Sick Children for treatment.

The fire broke out at about 1:30 a.m. on the second-story floor of an apartment on Vanauley Walk in the Bathurst and Dundas Streets area.

Strapko said an electrical outlet was the cause of the fire even though there were no appliances plugged into it at the time.

"If the little screws on the side of the outlet aren't screwed in properly, if there's even a hairline space, it could heat up to 800 F," he said.

Electrical malfunctions are one of the top causes of fires, he said. He listed the top five causes as:

  1. Cooking
  2. Cigarettes
  3. Arson
  4. Electric
  5. Candles

Non-functioning smoke detectors have been blamed on a number of fire fatalities this year. Over the weekend, a mother, her three young daughters and a teenage boy were all killed in a house fire in Hamilton where there were no smoke alarms working.