Brandtly Bedsaul will spend the rest of his life in prison for the rape and attempted murder of a 4-year-old girl last year, a Natrona County District Court judge ruled Friday.

Judge Thomas Sullins sentenced Bedsaul to 60 years to life imprisonment for attempted second-degree murder, and 40 to 50 years of imprisonment for the first-degree sexual abuse of a minor, with the sentences to run consecutively.

Sullins also ordered him to pay $5,049.50 to the Wyoming Division of Victim Services and $43,741.10 to the Wyoming Medicaid program.

The sentence for attempted second-degree murder will be served concurrently, or at the same time, as a sentence Bedsaul already received for an auto burglary case, the judge said.

Citing Bedsaul's defense attorney Kerri Johnson's comment that the crime was "very tragic," Sullins said the crimes warranted a substantial prison sentence. "The aggravating factors are something very extensive and very unusual," he said.

Johnson said Bedsaul deserved the sentence and he has accepted responsibility, but the crime highlights other problems, she told the court.

"This is the intersection of mental health and substance abuse," she said.

His family tried to get treatment for Bedsaul for a long time, and the inability to do so put the girl at risk, Johnson said.

"We need to start dealing with these issues in the community," she said.

Johnson and Assistant District Attorney Dan Itzen proposed the plea agreement in July

The plea agreement avoided a trial during which the family would have had to relive the events of late September, 2016, District Attorney Mike Blonigen said then. The family agreed with the plea deal, Blonigen said.

The girl is recovering from the brutal assault, Itzen said after the hearing.

The girl's family members were in the courtroom during the sentencing, and some of them cried.

Some of them filed written victim impact statements, Sullins said, but none were read during the hearing.

Bedsaul, 20, read from a statement and apologized for his crimes, and turned toward them a couple of times as he read.

The case started the evening of Sept. 28, 2016, when police responded to a residence in Casper, according court records.

People told police they were having a gathering with family members and children. One resident realized a child was missing, called for her but was unable to find her.

He went outside and saw Bedsaul with his hands around the girl’s neck. He was naked from the waist down, and her shirt was pulled up to her neck and she was covered in blood.

More From KGAB