DETROIT (AP) — A Michigan professor who was suspended in January for making a profanity-filled video to welcome students settled his legal dispute with a university by agreeing to accept $95,000.

Barry Mehler also agreed to a three-year gag order and retirement. If he criticizes Ferris State University, he could be forced to pay $60,000.

Mehler taught history at Ferris State for decades. He made headlines when the school placed him on paid leave in response to a provocative 14-minute video. Mehler used profanities and made a sexual reference as he rambled on about his attendance policy, grades, plagiarism and COVID-19.

Mehler says he was just trying to get students’ “juices flowing.”