The year that’s drawn to a close was the deadliest on Maine roads in years — bad enough that the state will launch a public safety campaign in the new year.

The state recorded 171 highway deaths through Sunday in an unofficial tally. That’s the most since 183 in 2007, said Lauren Stewart, director of the state Bureau of Highway Safety within the Maine Department of Public Safety.

The number of pedestrian deaths was 21, representing the worst year in Stewart’s records that date to 1993, she said.

There’s no common thread that emerges, but Stewart suspects distractions for both drivers and pedestrians have played a role in the growing numbers.

“Occasionally there’s going to be a spike in the numbers, and that’s what we saw this year. It was a bad year on Maine roads,” Maine Public Safety Department spokesman Stephen McCausland said.

The state is launching a campaign in the new year called “Heads Up” that aims to boost awareness for motorists and pedestrians. Part of the campaign, focusing on pedestrian safety during the winter, already has begun, Stewart said.

In the new year, there will be meetings with local communities with high incidences of fatalities to see what can be done to help. The state will offer reflective patches to pedestrians and grants to law enforcement officials for pedestrian-type enforcement.

McCausland said there’s plenty of blame to go around, but that pedestrians should be more careful.

“There are some basic things your mother told you: Look both ways before crossing the street. If it’s nighttime, wear something that can be seen, a reflector or have a flashlight,” he said, noting that dark clothing and rural roads are a bad mix.

Another common problem is people walking on roads instead of on sidewalks, but many rural roads don’t have sidewalks, he noted.

It was also a deadly year for motorcycle riders, with 27 riders dying on Maine roads. That compares to 18 last year and 32 the year before.

The statistics run contrary to the notion of young riders on fast bikes; the average rider who died was 50 years old, Stewart said. All but three of the victims were men, and most of the accidents happened during daylight hours, not at night, she added.

Follow the Bangor Daily News on Facebook for the latest Maine news.