Jail time spread over several years is the sentence for a onetime Burnsville High School music teacher accused of sex-related crimes involving two students.

Erik M. Akervik, 30, of Burnsville, was sentenced Wednesday in Dakota County District Court by Judge Arlene Perkkio, who also ordered that he be on probation for 15 years, pay restitution and register as a predatory offender.

Akervik will first serve 60 days in jail starting June 28. Then he will serve 30 days in jail for each year he is on probation, which may shift to electronic home monitoring in 2024.

“Sexual abuse of a student by a teacher is deplorable conduct, and we are pleased that Mr. Akervik has been held accountable for his actions,” County Attorney James Backstrom said in a statement.

Akervik pleaded guilty in March to third-degree criminal sexual conduct in connection with having sex with a 16-year-old male student. A second third-degree criminal sexual conduct count was dismissed in the plea deal.

Still pending, however, is a felony charge of electronic solicitation of a child. Burnsville police say they learned that while he was out on bail in April 2017, Akervik used Instagram to message a 15-year-old boy he met while he was youth choral director for Mount Olivet Lutheran Church in Minneapolis. Akervik asked the teen to follow him on Instagram, according to the Dakota County Attorney’s Office.

Akervik served as Mount Olivet youth choral director for six years. The church placed him on leave after his arrest and notified members via e-mail that Akervik had allegedly sent “inappropriate messages” to young members of the church.

Earlier that month, the high school official found that Akervik had been sending sexual messages to the 15-year-old. Police then discovered Akervik had sex with another student when that student was 16.

Akervik had worked for Burnsville-Eagan-Savage School District since August 2013. He taught music for Minneapolis Public Schools between 2010 and 2013.