The Kennebunk gymnastics coach charged with sexual abuse of a minor in April has been sentenced in Cumberland County Superior Court.

Jeremy Link, 43, of Kennebunk was sentenced July 20 to five years in prison with all but 22 months suspended after prosecutors say he was caught inside a darkened gym with a 14-year-old girl in Westbrook.

Link also was sentenced to two years’ probation, during which time he is not allowed to have contact with the victim or other minors, and he also must register as a lifetime sex offender, Tamara Getchell, a spokeswoman for the Cumberland County District Attorney’s Office confirmed Tuesday.

According to Link’s since-deleted Facebook page, he had been employed as a tumbling/stunting coach at Elite All-Stars of Maine Cheer and Dance in Westbrook and a former “ninja trainer” at Dudziak’s School of Gymnastics in Biddeford.

Police did not say where the assault occurred.

Prosecutors said Link was seen with his pants around his ankles by the girl’s father at a gym.

In April, Elite All-Stars of Maine owner Julie Dvilinsky wrote a lengthy letter on the Westbrook gym’s Facebook page regarding the incident, saying she was shocked at the news.

“This individual is no longer a staff member at our gym, and they are not a representative of our morals, values or what we teach, from staff to athletes,” Dvilinsky wrote, saying her thoughts went out to the victim and her family.

Dvilinsky said staff at the gym are required to undergo background checks, which Link had passed, and parents are invited to come to the gym and watch their children’s lessons. Parents must accompany their children and stay during the whole lesson if a child is working one-on-one with a staff member, she added.

Link had joined the Elite All-Stars Maine staff more than a year ago.

Cecile and Roxanne Deshaies, owners of Dudziak’s School of Gymnastics, condemned the former employee’s actions on Facebook in April, saying the gym promotes transparency and parent participation, that employees are required to undergo background checks when hired, and that staff members are never alone with students.