A black educator alleges in a lawsuit that she was subjected to racial discrimination in her job as an English teacher in a New York school district where she says she has been the only black teacher for 17 years.

Andrea Bryan, a high school English teacher, claims in her lawsuit against the Commack School District on Long Island that she "has been discriminated against and harassed by teachers and students" since she made a complaint about the lead teacher in the English Department.

Bryan, identified in court documents as a black female of Caribbean descent, alleges that the lead teacher, who is white, had made "racially derogatory" comments, according to the lawsuit filed Dec. 19 in federal court for the Eastern District of New York.

In one instance, when Bryan asked the lead teacher about a bag of peanuts on a table in the English office, he told her the food was "for whites only," the lawsuit states.

In connection with the English Department's teaching of the play "The Crucible," which features the character of a black slave who travels to the U.S. from Barbados, the same lead teacher allegedly asked Bryan in front of colleagues, “Andrea, can you translate slave talk for me?”

Bryan was "humiliated, degraded and embarrassed" by the remark, the lawsuit says.

After this incident in 2015, she made an official complaint about the teacher's remark, after which he was demoted.

Afterward, Bryan alleges she “was ostracized and made a pariah within the department,” according to the suit. She also claims that despite her rank as a senior teacher in the English Department, she was denied a dedicated classroom, "a privilege that had been afforded many white junior teachers."

Bryan did not comment beyond directing inquiries to her lawyer who has not responded to attempts by NBC News to reach him.

A spokeswoman for the school district said that it could not discuss the details of Bryan's claims due to privacy requirements, but "all of them have been investigated, and, to the extent appropriate, promptly addressed."

"The District takes any allegation of discrimination seriously and, as a matter of policy and practice, acts swiftly in response to any claim," the spokeswoman also said.

The Commack district serves about 7,800 students and as of the 2015-2016 school year its high school was 86 percent white, according to the New York State Education Department.

The "racial jeers, insults and taunts" against Bryan also came from students, the lawsuit claims.

In 2016, a student shouted "Aunt Jemima" at her in the school cafeteria. Bryan alleges her request to administrators to have the student removed from her class was not acted on.

And, in December 2017, Bryan claims a colleague presented her with a bottle of hand sanitizer at a Secret Santa gift exchange where the spending limit was $50 and at which other teachers received gifts of "appropriate value."

"Plaintiff understood that she was presented with hand sanitizer because she is black and, therefore, dirty in view of her colleagues," the lawsuit states.

Bryan accuses the Commack School District of indifference and failing to act in response to the alleged harassment and racial discrimination against her.