GRAND FORKS -- An Iowa man was ordered to spend more than a year behind bars for trying to use Craigslist to arrange sex with an investigator he thought was a 14-year-old girl.

Ryan William Baker, 33, of Coralville, Iowa, said nothing as Judge Donald Hager sentenced him to five years in prison on a Class B felony of luring minors by computer. The crime is punishable by up to 10 years in prison, but Baker signed a plea agreement for a lesser punishment.

Three of the five years will be suspended, and Baker has 262 days of credit for time served. Once released, he will have to register as a sex offender and will be on supervised probation for three years.

Court documents detail how Baker used a Craiglist ad titled “Fun in my truck?” to find someone to have sex with. A Grand Forks County Sheriff’s deputy answered the ad but posed as a 14-year-old girl, court documents said. The two exchanged emails and text messages in which Baker detailed the sexual acts he wanted to perform on the girl, court documents said.

Baker eventually said he wanted to meet with the girl to have sex, and the deputy told the defendant to go to the M & H gas station in Grand Forks, court documents said. Baker was arrested and admitted he intended to meet a girl so they could have sex.