A onetime Burnsville High School music teacher has pleaded guilty to sex-related crimes involving two students.

Erik M. Akervik, 30, of Burnsville, entered his plea to third-degree criminal sexual conduct Monday in connection with having sex with a 16-year-old male student and sending nude photos of himself via Snapchat to a 15-year-old male student.

Sentencing in Dakota County District Court is set for June 14. A second third-degree criminal sexual conduct count has been dismissed as part of the plea deal.

Still pending, however, is a felony charge of electronic solicitation of a child. Burnsville police say they learned that Akervik used Instagram last April, while out on bail in connection with the high school allegations, 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, a Burnsville High School official found Akervik had been sending sexual communications 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.