(SANTA ROSA, Calif.) — A 15-year-old student with a highly realistic replica handgun sparked a swift response from police ahead of a California high school graduation on Friday afternoon.The teen apparently drew the weapon, which was later determined to be a pellet gun, in Santa Rosa High School’s music building just before 11 a.m. Another student saw the weapon and reported it to the school’s resource officer, Matt Crosbie, according to the Santa Rosa Police Department.Crosbie immediately ordered the school to be placed on lockdown while he and five other officers quickly responded to the music room. The suspect had left the building, which prompted a continued lockdown and hourslong search for the teenager, police said.”During the search, Santa Rosa Police received information that the student may have fled campus as the lockdown was being initiated,” police said in a statement. “He was reported to have gone to the McDonald’s located across the street from Santa Rosa High School.”Police located the student in the neighborhood surrounding the school, and was arrested without incident at 12:48 p.m., authorities said.He no longer had the weapon on him, but later admitted to tossing it in a garbage can at the McDonald’s.The student, whose name will not be released as a minor, is being held at Sonoma County Juvenile Justice Center on a charge of possession of a weapon on school grounds.Authorities said the student had been suspended from school and was not supposed to be on campus Friday.Santa Rosa, which has an enrollment of over 2,000 students, is one of the largest schools in the Bay Area.Seniors were practicing on the football field for the evening’s graduation when the lockdown was put in place and were immediately rushed into the school’s gymnasium, according to San Francisco ABC station KGO. Underclassmen were still taking final exams.”I was scared for my son. I was worrying outside the school. But I talked with him [by cellphone] and he said, ‘Yeah, Mom, I’m OK,"” Evelia Benavides, whose son graduated Friday evening, told KGO.Parents were told to go to Santa Rosa Junior College, located adjacent to the high school, to be reunited with students.The day was surreal for graduates, who huddled in classrooms during the lockdown before walking across the stage at graduation hours later.”I was with my friends crying and really scared, being here today and celebrating at the end of that was really, really special for me and made me value it so much more,” said senior Grace Alchemy.The scare took place just hours prior to a fired employee walked into his former place of business in Virginia Beach, Virginia, and shot and killed 12 people before being killed by police.Copyright © 2019, ABC Radio. All rights reserved.