A homeless man who pleaded guilty to kidnapping and assaulting a good Samaritan in Mississippi has been sentenced to 18 years in prison.

News outlets report a judge sentenced 47-year-old Ernest Eugene Leffew on Tuesday.

Harrison County authorities say the good Samaritan, a man who wasn't named, met Leffew in a church parking lot on Sept. 24, 2017, to give him a ride to a laundromat to wash clothes. Officials say Leffew, however, ordered the man to drive to ATMs, where Leffew withdrew money from the victim's account. Investigators say he used the man's debit card to buy electronics at a Walmart and tied up the good Samaritan, leaving him inside a hotel room.

The victim escaped and officers located and arrested Leffew the following day.