Peter Martins, the longtime leader of New York City Ballet, has been removed from teaching his weekly class at the School of American Ballet while the two organizations jointly investigate an accusation of sexual harassment against him.

The accusation against Mr. Martins, 71, was made in an anonymous letter, both organizations confirmed on Monday. Mr. Martins is the artistic director and chairman of the faculty of the ballet school. He has led City Ballet, the company founded by the famed choreographer George Balanchine, since the 1980s.

“The safety and well-being of our students is our absolute priority,” the school said in a statement, adding that it “recently received an anonymous letter making general, nonspecific allegations of sexual harassment in the past by Peter Martins at both New York City Ballet and the school.”

“We, together with New York City Ballet, promptly engaged an independent law firm that specializes in such matters to conduct a thorough investigation, despite the anonymous nature of the letter and the lack of specifics,” the statement continued. “Thus far, the investigation has not substantiated the allegations in the letter or discovered any reason to be concerned about student safety.”