By Dana Kozlov

(CBS) – He was hired to keep students at a Chicago high school safe. Instead, police say he was having a sexual relationship with a student.

Slowly, students at Benito Juarez High School in Pilsen are learning about the criminal charge against the man who, until Tuesday, worked as a Chicago Public Schools security guard at their school.

READ MORE: Jussie Smollett Trial: Lead Detective In Investigation Explains On Witness Stand How Smollett Went From Victim To Suspect

He is 21-year-old Ellis Davis, now charged with criminal sexual assault for allegedly having an inappropriate relationship with a Juarez student.

Prosecutors say the two became close in October, even smoking marijuana in Davis’ car, when she was 16. When she turned 17, they say the relationship became sexual.

READ MORE: Chicago Weather: Slight Chance For Rain Wednesday Morning, Warmer During Day

Davis was arrested after the girl’s mom found text messages between the two.

A CPS spokesperson says school officials took immediate action after learning of the serious allegations and removed Davis from his security guard position.

MORE NEWS: View Live Radar

He is out on bail, CBS 2’s Dana Kozlov reports.