BEIJING (Reuters) - The suicide of a Chinese student who threw herself off a building after complaining of sexual harassment by a teacher has sparked online anguish about social decay, particularly because some onlookers egged her on and clapped when she jumped.

The 19-year-old student surnamed Li jumped to her death from the eighth storey of a building in the city of Qingyang last Wednesday, state media reported.

Videos of the incident shared online showed Li sitting on a ledge for hours while rescue workers tried to talk her down. Some passersby on the street below heckled her, shouting “How come you haven’t jumped yet?”

When she jumped, some people clapped while a rescuer worker screamed out in distress.

Police have detained some onlookers who shouted at Li, according to the state-backed China Youth Daily newspaper.

Online commentators lamented the callousness of the crowd.

“How cold is society that people will ask her to jump?” one person asked. “The sound of the rescue worker’s heart being torn reflects the evil of humanity.”

Li’s parents say their daughter became depressed after she was sexually harassed in September by a teacher who had tried to kiss and hug her, the newspaper reported.

Many Chinese schools and universities have been rocked by accusations of sexual harassment in recent years.

Rights activists and students had hoped to ride the wave of the global #MeToo movement to make progress in tackling what they say is systemic sexual harassment on campuses.

But the movement has struggled to maintain momentum due to widespread online censorship. Some schools have also pressed students not to organize protests or post accusations of harassment, activists say.

Li’s parents told the newspaper the harassment had led to bouts of depression, a diagnosis of post-traumatic stress and multiple attempts of suicide by their daughter.

The parents were offered 350,000 yuan ($53,564) in compensation by the school but they declined it as that would have required withdrawing their complaint against the teacher.

“We could not sign that humiliating agreement,” the newspaper quoted the parents as saying.

The Qingyang education bureau had disciplined the teacher at and organized the compensation package, the paper reported.

(Refiles to fix spelling in paragraph one)