A Westmoreland County prosecutor said rehabilitation was not a viable option for a Delmont man convicted earlier this year of the attempted sexual assault of a woman.

Assistant District Attorney Mike Pacek during a sentencing hearing on Tuesday for Brandon J. Pyle, 28, argued that his lengthy history of inappropriate and criminal behavior against women — which includes a half dozen protection from abuse cases — requires he serve a lengthy prison term.

“This person needs to be in state prison. He hasn’t learned his lesson and you cannot rehabilitate him,” Pacek said.

Pyle was convicted earlier this year of attempted sexual assault and simple assault of a woman in connection with an incident police said occurred on Nov. 24, 2022. His accuser claimed Pyle attempted to rape her after she confronted him about finding a link on his cellphone to a pornographic website for male prostitutes.

Pyle was acquitted of one charge of intimidation in connection to allegations of threats made to prevent his accuser from testifying against him at trial. Police said Pyle threatened to withhold money she said she needed to care for herself and a newborn child if she cooperated with authorities.

Pacek argued for Pyle to serve up to 10 years in prison. Westmoreland County Common Pleas Court Judge Tim Krieger rejected the prosecutor’s position that rehabilitation was not possible and imposed a mitigated sentence of 2 1/2 to five years in prison, saying Pyle’s history of mental health challenges affected his behavior with his accuser.

Pyle’s mother testified her son, was diagnosed with a form of autism as a child.

“There is hope for most people and there is hope for you,” Krieger said as he imposed the sentence. “This isn’t the end of your life.”

Pyle asked for leniency and said he wanted to to return home to care for his three young children.

“I love my children very much and my goal is to go back home and be a positive influence on them. I plan to change the people I associate with,” Pyle said.

Prosecutors said that in addition to Pyle’s lengthy history of abusive behavior with women, he is also awaiting trial on charges of burglary and making threats to another woman in Greensburg.