23-year-old Joshua Castro was arrested on Thursday.
The campus was put on lockdown after someone reported that a man with a gun a few blocks from campus.
RELATED: Shelter in place lifted, suspect in custody after man spotted on SJ State campus with gun
When officers arrived, they spotted the suspect who then took off toward the campus.
For hours, officers searched the Spartan Complex floor-by-floor, room-by-room.
They eventually found the suspect in the third-floor ceiling, hiding in the ductwork.
A handgun was found in the area.
#BREAKING Suspect in custody. He was found on the 3rd floor of Spartan Complex. Three females were inside building. The three were escorted out by PD, unharmed. Search continues for possible weapon. #SJSU #abc7now pic.twitter.com/E0tavzytgK— Amanda del Castillo (@AmandaABC7) August 9, 2019