WASHINGTON – Amid sharply rising rates of teen suicide and adolescent mental illness, two states have enacted laws that for the first time require public schools to include mental health education in their basic curriculum.

Most states require health education in all public schools, and state laws have been enacted in many states to require health teachers to include lessons on tobacco, drugs and alcohol, cancer detection and safe sex.

Two states are going further: New York's new law adds mental health instruction to the list in kindergarten through 12th grade; Virginia requires it in ninth and 10th grades.

Nationwide, cities and states have been adopting a variety of initiatives over the past decade to address the rising need for mental health care in schools.

But until this year, mandated mental health education had not been part of the trend.

"We're seeing a huge increase in youth anxiety and depression," said Dustin Verga, a high school health teacher in Clifton, N.Y., who was an early advocate for the state's new law.

"We teach them how to detect the signs of cancer and how to avoid accidents, but we don't teach them how to recognize the symptoms of mental illness," Verga said. "It's a shame because, like cancer, mental health treatment is much more effective if the disease is caught early."

A report from the Centers for Disease Control and Prevention this month shows the U.S. suicide rate rose by a quarter between 1999 and 2016. That and two celebrity deaths this month — those of fashion designer Kate Spade, 55, and chef Anthony Bourdain, 61 — have raised the nation's consciousness about depression and suicide prevention.

But mental illness can set in much earlier than adulthood. More than half of lifetime mental illnesses begin before age 14, according to the National Alliance on Mental Illness. Yet the average person waits 10 years after the first symptoms occur before getting treatment.

By educating children of all ages about mental health, the hope is that they will learn how to recognize early symptoms in themselves and their friends and seek help before a crisis develops, said Paul Gionfriddo, president and CEO of Mental Health America, a nonprofit that advocates for better mental health care.

"People are talking more about youth mental health and the effects of trauma on kids, but it's taken a long time to get traction. I think what we've seen recently in terms of school shootings is spurring this," Gionfriddo said. "It wouldn't surprise me to see a number of states go in the same direction over the next few years," he said, referring to New York and Virginia.

The rate of adolescents experiencing major depression surged nearly 40 percent from 2005 to 2014, according to a study by researchers at the Johns Hopkins University School of Medicine, rising to an estimated 2.2 million depressed children ages 12 to 17, according to the most recent federal data.

Teen suicides also have spiked. According to the CDC, the suicide rate among boys ages 15 to 19 increased by nearly a third between 2007 and 2015; the suicide rate among girls the same age more than doubled.

But that only accounts for the deaths. Nearly 9 percent of youths in grades nine through 12 attempted suicide in the past year, according to the CDC's 2015 Youth Risk Behaviors Survey.

In response, many states have increased funding for school counseling and added psychologists to their health staffs. Others are thinking of doing the same. Republican Texas Gov. Greg Abbott this month recommended adding more counselors to schools following a mass shooting at a Santa Fe school. His is one of 20 states that don't require school counselors.

And most states have adopted so-called mental health first aid programs to train first responders, primary care physicians, teachers and other school personnel to detect the signs of mental illness and addiction and provide preventive measures including referral to treatment.

In addition, a slim majority of states mandate suicide prevention training for school personnel, and close to a dozen states require annual courses. More than a dozen states encourage and facilitate training, but do not require it.

In New York, it was a nonprofit mental health group that came up with the idea of requiring schools to educate students about mental illness in all grades. That was seven years ago.

The Legislature was immediately interested, said John Richter, the public policy director for the Mental Health Association in New York State Inc. "The problem was finding a way to cut in line ahead of dozens of other competing educational issues."

It was the opioid crisis and its strong connection with mental illness that ultimately allowed the New York Assembly's education committee to bring the mental health bill to a vote in 2016, Richter said. Armed with research showing that people with mental conditions often self-medicate with drugs and alcohol, the chairman found an eager audience of lawmakers who wanted to do everything they could to quell the overdose epidemic, he said.

According to the National Institute on Drug Abuse, people with a mood or anxiety disorder are more than twice as likely to develop an addiction to opioids and other drugs.

New York's law doesn't prescribe a specific classroom curriculum for mental health, leaving the details up to the board of education. But the state is giving $1 million a year to the mental health association to offer an online mental health resource center and free training services for teachers starting in July.

"The life students live today is very different from what it was just 10 years ago," Clifton's Verga said. "Technology and social media have taken over. Kids are getting cellphones at an earlier age and facing escalating academic expectations and standardized assessments starting in third grade."