All California middle and high schools will be required to provide mandatory suicide prevention education for children in grades 7 through 12, under a new bill headed to the desk of Gov. Jerry Brown.

Lawmakers passed Assembly Bill 2246 on Tuesday, just in time for national suicide prevention month, reported NewNowNext.

“AB 2246 will save young LGBT lives,” said Rick Zbur, executive director of Equality California. “In spite of the sobering statistics on youth suicide, California lags behind many other states in requiring school districts to have suicide prevention policies in place.”

Suicide is the second leading cause of death among adolescents ages 10-24, after accidents, according to the Centers for Disease Control. The American Foundation for Suicide Prevention lists 25 states with laws requiring educators to receive suicide prevention training; 8 of those states require districts to have suicide prevention policies. And once the bill is signed, California will be the first state to require suicide prevention for LGBTQ students and other at-risk populations at the middle and high-school level.

According to Zbur, LGBT youth are up to four times more likely to attempt suicide, compared to their non-LGBT peers.

While the legislation will go a long way toward addressing the plight of lesbian, gay, bisexual, transgender and queer students across the state, the aim was to address the shortfall in protecting all California middle and high school students. Under current law, school districts were only encouraged to offer education like this.

“As a classroom teacher, I know from experience that educators often serve as the first line of defense when a student is suffering from depression or suicidal thoughts,” said Assembly member Patrick O’Donnell, the lawmaker who wrote the bill in conjunction with Equality California and the Trevor Project. O’Donnell chairs the education committee.

Once it becomes law, Assembly Bill 2246 will require them to plan how to teach prevention, intervention and follow-up, and work side by side with suicide-prevention experts, parents, student advocates and mental health professionals.

Districts will follow a model that the law mandates be established by the state department of education.