A large group of teenagers surrounded a school safety officer a few blocks west of Wilson High School Thursday afternoon, prompting police to respond and take three kids into custody, authorities said.

Police said the situation started around 3:20 p.m. when the safety officer tried to give a boy a citation near 8th Street and Loma Avenue.

At that point, 20 to 30 teenagers surrounded the officer, police said. Authorities estimated all the kids were between 15 and 17 years old, Long Beach Police Department spokeswoman Shaunna Dandoy said.

LBPD officers rushed to the scene and helped break up the group, police said.

In the end, they took a 17-year-old, a 15-year-old and another teenager into custody, according to Dandoy.

It wasn’t immediately clear how old the third teenager was. He or she was taken to the hospital before being booked, police said, but they did not provide information on what caused the injury or how serious it was.

The safety officer wasn’t hurt, Dandoy said.

School safety officers are armed and employed by the school district, but they’re not sworn peace officers with full-fledged police powers, Long Beach Unified School District spokesman Chris Eftychiou explained.

He declined to answer questions about the incident or say what the officer was trying to issue a citation for.

“This was an off-campus incident that’s still being investigated by law enforcement, so we cannot provide further information,” he said.

Police also declined to say what the original citation was for, referring questions back to the school district.

Editor’s note: This story was updated to clarify that the officer in question was a school safety officer. The school district also employs campus security officers, who are not armed.