A former math teacher in Colorado will serve seven years in prison for the sexual assault of a minor, The Denver Post reported.

Benjamin Forbes, 31, was arrested last December for conducting an ongoing sexual relationship with a 16-year-old female student between August and December last year.

At the time, Forbes was a math teacher, coached boys soccer and held various other coaching jobs at Westminster High School in Adams County, located east of Denver.

After police were contacted by school administrators about “an incident which occurred between a teacher and a student on the school campus,” Forbes was arrested. Police say a school employee noticed odd behavior between Forbes and a female student and reported it to administrators.

The disgraced teacher pleaded guilty to one count of “attempted first-degree assault and attempted sex assault on a child,” according to the district attorney’s office. Both counts are felonies.

Senior Deputy District Attorney Amy Petri-Beard told the judge the case was a serious one because parents place such trust in teachers to take care of their children. She said that Forbes took advantage of one of his students.

Adams County District Judge Sharon Holbrook said that once children begin attending school, they spend more time in the care of their teachers than in the care of their parents. She said Forbes betrayed the trust that was placed in him.