Updated

A Wyoming judge said the crime forever altered this close-knit community east of Yellowstone National Park.

A Montana man lured a 10-year-old Cody girl from outside the county library with the tale of a lost puppy, held her at gunpoint, tied her up and took her to the wilderness to sexually abuse her. Hours later, he abandoned the victim along a remote dirt road, where she was found that night by a pair of hunters.

For that, Wyoming District Judge Steven Cranfill on Tuesday sentenced Jesse Paul Speer, 41, of Manhattan, Mont., to life behind bars. Cranfill said Cody, a picturesque town of fewer than 10,000, would never be the same.

"When you completed this sick dream of yours, you discarded her like a piece of garbage on a cold desolate road," the judge told Speer. "You will leave a legacy in Park County, albeit a dark one. No parent will ever drop off their child at the library again without thinking of you."

Speer pleaded guilty Tuesday to aggravated kidnapping, use of a firearm in the commission of a felony, and two counts of sexual abuse of a minor.

In court, he recounted the October 2012 kidnapping, which was backed up by an affidavit from law enforcement officials.

The victim's mother said in a statement read into the court record by an advocate that her daughter still has panic attacks and nightmares caused by the abuse. She called Speer a "very dangerous and scary person."

"He infected her life forever, took her innocence from her," the mother's statement said. Her name was not provided in court.

Cranfill sentenced Speer to 30 to 50 years on the abuse counts and a life term for the kidnapping, to be served consecutively.

The defendant offered no explanation for what he called the "evil that sprang from my heart" and showed little reaction as his sentence was pronounced.

Earlier, he choked up and took a long moment to compose himself as he apologized to the victim, her family and the community.

"I am truly sorry for what I've done," he said. "I embrace the hatred and the anger directed my way and hope that most can release it."

Speer's attorney, J. Travis Smith, argued for a more lenient sentence to give his client a chance at rehabilitation. He pointed out that Speer had no prior criminal record, has suffered from mental health problems and willingly confessed to investigators.

County Attorney Bryan Skoric countered that life in prison was appropriate for a man who came to Cody "trolling" for a victim. The girl's life was spared only by the good fortune of being found by the two hunters, he said.

Speer's "only concern was getting away from the crime he committed," Skoric said. "He chose to institute a course of crime that would forever alter her life, her family's life and this community's sense of security."

Speer was tracked down by investigators who paired the girl's account of her abduction with video footage of his Toyota 4-Runner passing through the park on the day before the incident.

The divorced father of two was arrested by the FBI a week later in Belgrade, Mont., not far from his home. He acknowledged the abduction and said he had struggled with an addiction to pornography, according to court documents.

He pleaded guilty under an agreement with prosecutors that was approved by the victim's family, who hoped to avoid a trial, Skoric said. The agreement did not contain a sentencing recommendation.