A 19-year-old man was arrested Tuesday after he brought a gun to South Cobb High School.

When the man walked onto the campus with a backpack, school officials immediately recognized that he did not attend the school, according to a letter written by principal Clint Terza that appeared on the school’s website.

The man was questioned by school officials and later arrested by police. Officials found a gun when they searched his backpack.

According to Cobb police spokesman Sgt. Dana Pierce, the gun was stolen. The man was taken to the Cobb County Adult Detention Center.

Two juveniles were also arrested during the incident.

“I am thankful to work with so many individuals that focus on keeping our campus free from outside distractions,” Terza’s letter said. “Their alert and quick thinking actions resulted in an immediate arrest.”

The principal did not say why the man was on campus or his connection to the two juveniles.

Their charges were not released.