FARMINGTON, Utah – Stephen Niedzwiecki, a former teacher and basketball coach, was sentenced to up to 20 years in prison last week for having a sexual relationship with a former student.

Niedzwiecki pleaded guilty to unlawful sexual activity with a minor and unlawful sexual activity with a 16- or 17-year-old, according to a report from the Associated Press.

The victim, now 18, told authorities that the sexual abuse began in 2011 and continued until the fall of 2012.

MORE NEWS: Know These Before Moving From Cyprus To The UK

Authorities allowed the teacher to plea to lesser charges than were originally filed because the sexual part of the relationship did not begin while the student was in his class, according to the news report.

Iowa teacher accused of having sex with 17-year-old student

A 33-year-old former teacher at Iowa’s Ankeny High School has been charged with sexual exploitation by a school employee for allegedly having a sexual relationship with a 17-year-old student.

Mandy Davenport, a Des Moines resident, resigned from her position as a language arts teacher at Ankeny High School last week, according to a report from Omaha.com. She had been placed on leave April 4.