A New Jersey mother is suing a local school district, claiming that her 12-year-old son took his own life in 2017 because classmates bullied him for being gay.

Tristan Peterson, a student at Woodruff Middle School in Bridgeton in the southern part of the state, came out as gay to his peers in 2017, according to the lawsuit. He died by suicide in his parents' home that December after experiencing repeated bullying, the suit says.

His mother, Marcy Peterson, claims in the suit filed in October in state Superior Court in Cumberland County that his death was a "result of an extended and persistent period of bullying, intimidation, and harassment."

The suit accuses the school, the Upper Deerfield School District and staff of negligence, and of violating the state's discrimination law, wrongful death and creating a hostile learning environment. Several district staff and the state of New Jersey are also named in the suit, which seeks damages and a jury trial.

Tristan was bullied and harassed repeatedly by his classmates, according to the lawsuit. During a November 2017 incident, just days before the boy's death, a staff member at the school witnessed another student threaten Tristan, the suit says.

The boy and his mother complained multiple times about the bullying, but staff "failed to properly and/or prevent the abusive behavior," the suit claims, adding, "The defendants had a duty to provide for the safety and security of students."

The Woodruff Middle School and Upper Deerfield School District did not immediately return NBC News' request for comment.

District Superintendent Peter Koza told NJ.com that he could not comment on the matter because of the litigation.

If you or someone you know is in crisis, call the National Suicide Prevention Lifeline at 800-273-8255, text HOME to 741741 or visit SpeakingOfSuicide.com/resources for additional resources.