BERLIN — A swimming instructor in southwestern Germany has been convicted of sexually abusing 37 girls he taught.

Germany's dpa news agency reported the 34-year-old man was sentenced to 12 years in prison on Monday in Baden-Baden regional court. His last name wasn't given in keeping with German privacy laws.

Prosecutors said he abused the girls ages 4 to 12 in a pool and a changing room from October 2015 until his September 2017 arrest. They say he threatened to kill two 5 year olds if they told their parents. Underwater video footage the instructor took of some of the acts was presented as evidence.

He apologized in court, saying he "deeply regretted" his actions.

Because of the severity of the crimes, the court ordered his continued detention after he completes his prison sentence.