CHICAGO (CBS) — An Algonquin man has been arrested on felony charges, after allegedly trying to arrange to have sex with who he believed was a 14-year-old boy.

Lake County Sheriff’s officials said 23-year-old Thomas Casey used a social media app to communicate with who he believed was a 14-year-old boy, but was actually a detective.

Casey allegedly asked to meet with the boy to smoke pot and have sex, and drove to Warren Township on Thursday to meet with the boy. Instead, he was arrested by sheriff’s detectives.

thomas casey Algonquin Man Arrested For Trying To Arrange Sex With Teen

Thomas Casey is charged with indecent solicitation of a child and unlawful possession of drug paraphernalia. (Credit: Lake County Sheriff)

He has been charged with two felony counts of indecent solicitation of a child, and one misdemeanor count of unlawful possession of drug paraphernalia.

Casey was set to appear for a bond hearing Friday morning.