DOVER-FOXCROFT, Maine — A Greenville man pleaded guilty on Tuesday to 26 counts of sex crimes against minors.

Shawn David Worster, 49, pleaded guilty to the crimes in Piscataquis County Superior Court. The crimes against two children took place over the course of three years, according to documents at the Piscataquis County district attorney’s office.

The victims, a boy, 10, and a girl, 8, are not being named by the Bangor Daily News.

Worster pleaded guilty to 10 counts of Class A gross sexual assault, five counts of Class A unlawful sexual contact and 11 counts of Class B unlawful sexual contact. Five counts of Class A unlawful sexual contact were dismissed. He was indicted in January on 31 total counts.

Piscataquis County District Attorney R. Christopher Almy said the plea agreement will save the victims from having to testify at a trial.

“I was of two minds on this situation. On one hand, it’s certainly within the realm of possibility for him to serve 20 to 25 years in prison,” Almy said on Wednesday. “I and the children’s mother had a big discussion on the impact on the kids if required to testify. When I interviewed [the children], they were reluctant to talk about what happened. I felt that forcing them to talk about what happened in the presence of [the perpetrator] would have been damaging.”

Almy said Worster likely would have been sentenced to 45 years in jail if found guilty by a jury. Instead, Almy will recommend 15 years in prison with supervised released for the rest of his life.

“It would’ve been torturous to [the kids to have to testify],” Almy said. “In order to save the kids [from] trauma and testifying in a courtroom in front of the perpetrator, this seems reasonable.”

A sentencing date has not yet been set, said Almy.

Piscataquis County Sheriff’s Department Chief Deputy Bob Young, who investigated the case, said the victims will have to live with what happened for the rest of their lives.

“The victims will be living with the results of his crime for years and years and years,” Young said on Wednesday. “That’s the hard part of it. It’s lifelong effects in many cases. That’s a tragedy.”

According to court records, the Greenville Police Department was contacted on June 15, 2012 about the abuse. Three days later, the sheriff’s department was notified.

On June 21, 2012, Worster left a confession note of the crimes at his parents’ house in Greenville. In the note, he said he was sorry for what he had done and wished “I could have a do-over. I never would have touched them.”

The same day the note was found, Worster contacted Greenville Police Chief Jeff Pomerleau, stating he was out of state. Worster turned himself in to police custody on June 24.

During the initial interview, Worster gave details of the crimes and said there were dozens of incidents. He cried several times during the interview, Young said in his affidavit. Worster said he planned to move to Washington state to start his life over.

Worster remains in Piscataquis County Jail.