CHICAGO — A Chicago Police officer who was also employed as a security guard at a high school has been charged with having a sexual relationship with an underage girl who attended the school, reports CBS Chicago.

Eugene Ciardullo, 51, was charged with one felony count of criminal sexual assault of a victim between 13 and 17 years old. The student, who is now 18, allegedly acknowledged to authorities that she had a sexual relationship with Ciardullo.

The suspect allegedly befriended the victim during the 2014-2015 school year, when she was a 16-year-old sophomore, Cook County Assistant State’s Attorney Ed Murillo said in bond court on Sunday.

Get Breaking News Delivered to Your Inbox

Ciardullo and the girl exchanged phone numbers and chatted on social media during the summer after her sophomore year, Murillo said.

In September 2015, during her junior year, Ciardullo allegedly told her through the social media site Snapchat that he had feelings for her. Less than a month later, he told her he loved her, Murillo said.

The relationship soon became physical and carried on from February through December 2016, with Ciardullo meeting the girl, then 17, for sex in an empty parking lot and in motel rooms, Murillo said.

During July and August, Ciardullo — a Marine Corps veteran — began personally training the girl in preparation for a physical fitness test to enter the Marines, Murillo said.

The two discussed their age difference, and Ciardullo told the girl he “could lose his job and go to jail if they were caught,” Murillo said.

Ciardullo allegedly told the girl to “tell people who asked about their relationship that they were just good friends,” Murillo said.

One of the girl’s relatives confronted Ciardullo in late November after learning of a text exchange between the two, and Ciardullo admitted they were having a relationship, Murillo said.

Police arrested Ciardullo on Friday, and he allegedly admitted to having a sexual relationship with the girl.

Ciardullo’s bail was set at $75,000, and a judge has barred him from having contact with the victim or anyone under the age of 18.

The Chicago Police Department is investigating the case internally and administratively, a spokesperson told CBS Chicago.