A truck driver who admitted he was distracted before causing a fatal accident has been sentenced to prison for manslaughter.

WLBZ-TV reports 33-year-old Joshua McNally of Westbrook pleaded guilty to charges of manslaughter and causing a death while driving with a suspended license. He received his sentence this week of 17 years in prison, with all but six years suspended. In addition, McNally will be on probation for four years and will have his license suspended for 15 years.

It was last year when a truck driven by McNally veered into the wrong lane several times, narrowly avoiding several accidents, before finally hitting a vehicle driven by Adam Perron, head-on. The 29-year-old was a popular teacher at Lake Region Middle School, and had just recently become a father.

According to court documents, McNally's cell phone records showed that he'd been making calls on his cell phone and sending text messages while driving, just before the accident. The last call before the crash was to a friend who supplied him with drugs. He was also driving with a suspended license, after failing to pay a fine for a distracted driving charge.

More From WQCB Brewer Maine