Attendance was down at schools across the city today, an annual Halloween phenomenon that teachers said is driven by rumors of gang violence.

Eighty-two percent of students came to school today citywide, well below the average daily rate of 92 percent, according to preliminary attendance data posted on the Department of Education’s website.

Attendance was lowest at high schools and in pockets of Brooklyn and the Bronx. At several schools where daily attendance averages about 75 percent, including Banana Kelly High School and Lehman High School in the Bronx, only about 40 percent of students showed up today.

Assemblyman Karim Camara told GothamSchools that parents reported low attendance in many Central Brooklyn schools. On Twitter, Brooklyn high school teacher Stephen Lazar said only 50 to 60 percent of his students had come to school today. Another teacher, Janine Whitman, said only 2 of her 12 students were in class this morning. “We were missing many students AND teachers today!” wrote Mark Anderson, who teaches at an elementary school in the Bronx.

One reason for the low attendance is persistent concerns that gang violence will spike on Halloween, thought to be a popular day for initiation challenges. In 1997, vigorous warnings by Mayor Rudy Giuliani and Chancellor Rudy Crew prompted 40 percent of students citywide to stay home, and many schools canceled afternoon activities.

A teacher said students at his Bronx high school, where at least a third of students were absent today, had warned him of increased gang violence on Halloween.

“Some of my students told me for my own safety’s sake that while biking home through the Bronx I should watch out for groups of young men in bright red or black hoodies and should steer clear of them,” he said in an email. “Some of my students said that they had arranged for rides in cars to and from school today because gangs hang out outside the 2 train stop in their neighborhood. Our students were also excused from uniforms for today so that they wouldn’t get harassed during their commute.”

Rumors of mass violence did not pan out in 1997 or periodically over the years when they have resurfaced.

A South Bronx high school teacher said she thought her students knew they had nothing additional to worry about today.

She said her students are “kids who are not afraid of gang violence but know that attendance is historically low and they won’t be missing much.”