A star dancer with the New York City Ballet, who has come under fire for sharing vulgar text and sexually explicit photos, plans to leave the company next year.

Dancer Amar Ramasar will retire in May after a 20-year career with City Ballet, according to an announcement for the 2021-22 season the company released this month.

Ramasar has been under intense scrutiny since 2018 when he and two other male dancers were accused of sending inappropriate texts and photos from fellow City Ballet dancers.

The scandal rocked the ballet company and became a high-profile test of the #MeToo movement. One dancer accused the company of tolerating a “brotherly atmosphere”.

In 2018 the City Ballet released Ramasar. Months later, he was reinstated after an arbitrator ruled the company had exceeded.

City Ballet confirmed Ramasar’s resignation but made no further details, only saying that his farewell performance would be on Balanchine’s “A Midsummer Night’s Dream”.

In a statement, a Ramasar spokeswoman said he will be 40 years old this year and ready to retire.

“Amar has had a fine career with the New York City Ballet,” said spokeswoman Kimberly Giannelli. She said he was looking for other career opportunities.

Ramasar has previously said that he has learned from past mistakes. He has argued that he was only sharing pictures of his own consensual sexual activity.

Ramasar, a solo dancer, was also successful on Broadway, appearing in productions of “West Side Story” and “Carousel”.

But the SMS scandal continued to tarnish his career. Critics protested his performances and demanded his dismissal.

Other City Ballet dancers have also accused Ramasar of inappropriate behavior. Soloist Georgina Pazcoguin writes in her new memoir that Ramasar often greeted her by touching her breasts. Ramasar denies the allegations.

City Ballet has grappled with a number of scandals in recent years, including allegations of sexual harassment and physical and verbal abuse by its former ballet master Peter Martins. (Martins has denied the allegations.)

The pandemic has also challenged the company, which has resulted in the cancellation of the winter and spring seasons.

City Ballet will return to the stage on September 21st with a program of Balanchine’s “Serenade”.