PORTLAND, Maine — Maine had low numbers of fire deaths in 2009, while the number of homicides was near average.

For the year, there were 14 fire deaths, down from 15 in 2008 and just two more than the record low of 12, in 2007 and 1995.

Maine had 40 to 50 fire deaths a year a decade ago. The number has dropped with improved building codes, widespread use of fire detectors and stepped-up fire prevention programs by local fire departments, Department of Public Safety spokesman Stephen McCausland said.

“It’s been an exceptionally safe year on Maine’s highways and an exceptionally safe year in people’s homes,” McCausland said.

In 2009 there were 158 traffic fatalities, three more than in 2008, which had the lowest total since 1959.

The state saw 25 homicides in 2009, down from 31 the previous year and near the average of about 24. Ten of the homicides have been classified as domestic.

There were three double homicides during the year, and two victims were killed after being set on fire.

Kimberly Spaminato is charged with murder for allegedly setting her husband on fire last January as he slept in their home in Wells.

In August, 12-year-old Michael Devine was killed when his mother set their vehicle on fire in a gravel pit in Gorham in what has been ruled a murder-suicide, officials said.