A 25-year-old sex offender has been sentenced to 40 years in prison for luring a 12-year-old Wyoming girl to Montana, giving her alcohol and marijuana and repeatedly assaulting her over a four-day period.

U.S. District Judge Donald Molloy sentenced William Richard Nielsen of Missoula on Tuesday. Nielsen previously pleaded guilty to coercion and enticement of a minor.

Prosecutors say the girl from Sheridan, Wyo., told investigators she met him through the website MySpace, the two began "sexting" and he convinced her to buy a bus ticket to Missoula in January.

Court records say her parents found her by posing as one of her friends online and telling Nielsen they had drugs available. Nielsen was arrested after the girl's father confronted him and police were called to the disturbance.

Nielsen also must pay $7,305 in restitution.

Associated Press

More From Newstalk KGVO 1290 AM & 98.3 FM