A California school accused of allowing sexism and homophobia has reached a settlement with the American Civil Liberties Union (ACLU).

The ACLU had accused the Newport-Mesa Unified School District of failing to prevent homophobic and sexist bullying at Corona del Mar High School.

In a lawsuit it said: “Students are routinely referred to … with words such as ‘dyke,’ ‘butch,’ ‘fairy,’ ‘gay,’ ‘homo’ and ‘queer’ by other students at school in hallways and classrooms within earshot of teachers, but without repercussion.”

It continued that school administrators were “permitting and sanctioning an atmosphere that is hostile to female, lesbian, bisexual, gay and transgender students in general, and has led to despicable threats of violence against one student in particular.”

That student was Hail Ketchum, 17, who played the HIV-positive female lead in the school’s production of the musical Rent. Ketchum, who revealed her identity this week, was threatened with rape and murder by three students on the football team. The three students also used homophobic insults against another student.

The production of Rent, which has gay and HIV-positive characters, was another contentious issue. It was cancelled in March by school officials, allegedly due to gay content. It was later reinstated.

Under the settlement, Newport-Mesa Unified School District will hold “mandatory training sessions for administrators, teachers and students that will focus on the harmful impacts of sexual discrimination and harassment,” the ACLU said in a statement.

The school has denied any wrongdoing but has welcomed the extensive anti-discrimination training saying it will “contribute to an overall positive environment at Corona del Mar High School”.

School officials have also agreed to give a written apology to Hail Ketchum.

Ketchum, who has since transferred to another school, said: “I hope the students at Corona del Mar High School will learn from my experience that it’s possible to stand up for what is right and prevail.”