NEW BEDFORD, Mass. (WPRI) — A New Bedford man will spend up to 20 years behind bars thanks in part to the Bristol County District Attorney’s Office’s new support dog.

Lawrence Trahan, 44, was convicted earlier this month of aggravated rape of a child and battery of a person under the age of 14, according to the DA’s office.

Detectives began investigating Trahan in December 2017 when the victim, a 10-year-old girl, first came forward.

The victim told investigators that Trahan touched her in “weird places” and sexually assaulted her more than 20 times, according to the DA’s office. The DA’s office said Trahan had access to the victim through his relationships with her mother.

The DA’s office said the victim struggled to talk about what Trahan did to her, and it was unclear whether she would be able to testify against him in court.

That’s when the DA’s office brought in Chief, a support dog whose job is to comfort children during forensic interviews, to help ease her anxiety.

It worked and, as a result of the victim’s testimony, Trahan was sentenced to serve between 15 and 20 years in state prison, followed by five years of supervised release.

The judge also barred Trahan from having any unsupervised contact with children.

Trahan was ordered to register as a sex offender upon his release from prison, and his probation will include GPS monitoring.