Emotional support from middle school teachers may reduce the risk their students will engage in early use of alcohol and other illicit substances, a new study suggests.

The study included 521 middle school students in Seattle. Students who felt more emotional support from teachers reported a delay in starting to use alcohol and other illicit substances, PsychCentral reports. The students defined teacher support as feeling close to a teacher, or being able to talk about their problems with a teacher.

Middle school students who had higher levels of separation anxiety from their parents were also less likely to start using alcohol early, the study found.

“Our results were surprising,” lead researcher Dr. Carolyn McCarty, of Seattle Children’s Research Institute, said in a news release. “We have known that middle school teachers are important in the lives of young people, but this is the first data-driven study which shows that teacher support is associated with lower levels of early alcohol use.”

Dr. McCarty said students who have separation anxiety may be less susceptible to negative influences from their peers, including experimenting with drugs and alcohol.

The study also found students who started drinking or using drugs before sixth grade had significantly higher levels of depressive symptoms. Students who had experienced recent stressful life events in sixth grade were significantly more likely to start using an illicit substance by eighth grade, the researchers found.

“We need to be aware of and monitor early adolescent stress levels, and parents, teachers and adults need to tune into kids’ mental health,” Dr. McCarty said. “We know that youth who initiate substance abuse before age 14 are at a high risk of long-term substance abuse problems and myriad health complications.”

The study appears in Psychology of Addictive Behaviors.