Fairfax County police arrested a former Loudoun high school basketball coach on charges he set up a sexual encounter with an undercover detective who posed as a teenage boy, police and school officials said Wednesday.

Fairfax investigators charged Joshua Shearin, 22, with three felony charges of solicitation of a minor, police said in a statement. Police allege that Shearin, of Fairfax, used a social media dating app Tuesday and exchanged messages with a detective who pretended to be a 14-year-old boy, officials said.

Shearin sent explicit pictures before he chose a location to meet, where investigators arrested him when he arrived, police said.

Detectives also charged him with two counts of use of communications systems to facilitate certain offenses involving children and one count of attempted indecent liberties, police said. Shearin is being held without bond at the Adult Detention Center, officials said.

Loudoun school officials notified parents from Tuscarora and Heritage high schools, where Shearin coached freshman and junior varsity basketball, of the arrest in an email. School officials said that Shearin no longer works for the school system and school officials are cooperating with police.