(NEXSTAR) – A Texas student who says she was bullied over her refusal to participate in the Pledge of Allegiance has been awarded $90,000, according to the civil rights organization representing her.

In 2017, the student sued her 12th grade sociology teacher at Houston-area Klein Oak High School. The teacher, Benjie Arnold, allegedly singled her out for harassment, at one point forcing her to write out the Pledge against state law, American Atheists stated in a news release Tuesday.

The payment, made through a risk pool funded by Texas school districts, prevented the case from going to trial. The Texas Association of School Boards did not immediately respond to Nexstar’s request for comment.

During her four years at Klein Oak High School, the student declined to participate in the Pledge of Allegiance “out of her objection to the words, ‘Under God,’ and her belief that the United States does not adequately guarantee ‘liberty and justice for all,’ especially for people of color,” according to the group.

Arnold allegedly retaliated against her, threatening to give her failing grades for refusing to write out the Pledge and at one point went on a tirade captured in an audio recording during which he offered to pay students to leave the country if they didn’t like living in America.

It got so bad, according to the release, that the student was homeschooled for a time before returning to Klein Oak, at which point the alleged harassment intensified.

“Nonreligious students often face bullying or harassment for expressing their deeply held convictions,” said Nick Fish, president of American Atheists. “No one should have to endure the years of harassment, disrespect, and bullying our client faced. The fact that this happened in a public school and at the hands of staff who should know better is particularly appalling. After nearly five years of litigation, the defendant finally made the only smart decision and agreed to settle this case.”

In 1943, the U.S. Supreme Court ruled that forcing public school students to salute the flag or recite the Pledge of Allegiance violated First Amendment rights.

Texas law also protects students from having to recite a pledge of allegiance as long as they have a written request from their parent or guardian, which she did.

“The classroom is not a pulpit. It is a place of education, not indoctrination,” said Geoffrey T. Blackwell, Litigation Counsel at American Atheists, who handled the case and settlement negotiations in partnership with Texas civil rights attorney Randall Kallinen. “This settlement serves as a reminder that students do not lose their First Amendment rights when they enter the classroom.”

The school district did not fire Arnold, according to the Courthouse News Service, who is still at Klein Oak High School where he is teaching for his 51st year.