The use of illicit drugs, the abuse of prescription medication and the incidence of depression have increased among Fairfax County teenagers, according to the results of an annual survey.

The Fairfax County Youth Survey found, however, that fewer Fairfax teens are drinking alcohol, smoking cigarettes and using marijuana than in years past. In 2012, fewer students engaged in binge drinking than the year before, with 18.2 percent of 12th-graders saying they had five or more drinks in one night within the past two weeks, as compared with 20.7 percent in 2011.

The survey polled more than 32,000 students in eighth, 10th and 12th grades, asking a variety of questions related to drugs, sex, depression, alcohol and risky behavior. County officials use the results to gauge targets for intervention and educational efforts.

The survey found that students are drinking with less frequency, according to the survey, with 35 percent of 12th-graders reporting they had been drinking within the past 30 days, compared with 37.1 percent the year before. Students also reported driving after drinking with less frequency compared with previous years.

Cigarette use also has declined since 2010, with 16.6 percent of students saying they smoked tobacco during their lifetime in 2012, a drop of 3.5 percentage points from 2010. Among high school seniors, about 10.2 percent said they had smoked a cigarette within the past 30 days, down from 13.2 percent in 2011.

About one in five Fairfax students said they had used marijuana at least once in their life. Fewer students said in 2012 that they had used marijuana in the past month compared with the year before, but a slightly higher percentage of students in 2012 said they smoked marijuana at least once compared with 2010.

“The results are encouraging in some areas — particularly the decrease in the incidence of bullying and alcohol use — and we will continue to closely monitor the survey results to target intervention and prevention efforts,” county schools spokesman John Torre said.

Students also said they began consuming alcohol, tobacco and marijuana earlier in life than in the previous year’s survey.

The survey also showed that more students in Fairfax were using hard drugs than in years past. More students reported abusing prescription drugs such as Ritalin, Adderall or Xanax. In 2012, 6.2 percent of seniors reported using prescription medications without a physician’s order, compared with 5.1 percent in 2011.

The use of heroin, methamphetamine and hallucinogenic drugs such as LSD has climbed since 2010. The designer drug ecstasy — a form of which is known in pop culture as “Molly” — has risen in recent years. In 2012, 2.2 percent of high school seniors said they had used ecstasy recently, up from 1.6 percent the year before. Fairfax seniors use ecstasy at nearly double the national average.

More Fairfax students reported abusing powerful prescription painkillers such as Oxycontin, Vicodin, Percocet and codeine in 2012 than the year before, but last year was down from two years earlier. In 2010, 6.5 percent of seniors said they had used prescription painkillers, compared with 5.3 percent in 2011 and 6.1 percent in 2012. The use of steroids without a physician’s order has also risen slightly since 2010.

Depression, which has been tied to drug use, also rose in 2012. In 2012, 31.3 percent of students said they felt sad or hopeless for an extended period of time compared with 29.3 percent in 2011.

Among Hispanic girls, the rate of depression was significantly higher than the county average, with 49.8 percent saying they felt depressed in 2012 compared with 37.1 percent of girls countywide. Among Hispanic teenage boys, 31 percent said they felt depressed, compared with 25.2 percent of all Fairfax boys.