A man has been charged with trying to solicit sex through a dating app from a police officer posing as a 15-year-old boy.

Jaime Garcia, 40, was arrested Thursday and charged with felony counts of aggravated criminal sexual abuse, traveling to meet a minor, indecent solicitation of a child and grooming, according to a statement form the Cook County sheriff’s office.

Garcia responded to an ad on a dating app Feb. 25 and sent sexually explicit messages to someone he thought was a teen but was actually an undercover officer, the sheriff’s office said. He arranged to meet the “child” for sex and was taken into custody when he arrived.

Judge Paula M. Daleo set his bail at $35,000 during a hearing Friday at the Maywood Courthouse, according to Cook County court records.

Garcia, who lives in Irving Park on the Northwest Side, was released on electronic monitoring after posting bond, according to court records. He is due back in court March 12.

Read more on crime, and track the city’s homicides.