MINNEAPOLIS (WCCO) – A 36-year-old former teacher was sentenced to 120 days in Washington County Jail on Wednesday after he pleaded guilty to having sex with teenage students at his home.

Matthew Robert Koenen, who taught at Grantsburg High School in western Wisconsin, pleaded guilty in September to two counts of third-degree criminal sexual conduct. He was sentenced this week to time in county jail and 15 years of probation. A 4-year prison sentence was stayed, provided he abides by the terms of his probation.

Last November, Koenen was accused of having sexual relationships with two 16-year-old girls from Grantsburg High School. One of those relationships lasted more than six months. After it ended, the girl involved told school officials, and Koenen was asked to resign.

Koenen hid the relationships from his wife, investigators said, by using three different email accounts and two cell phones.