Police arrested the suspect, bringing an end to an incident that started right behind the Milpitas Police Department.
Officials say they heard an audible alarm coming from Target Masters West around 2 a.m.
They say they saw the suspect through a glass door, holding a gun. He dropped it when police commanded him to do so.
"My sergeant saw him holding a gun when he came to the glass door. The sergeant gave him commands to drop the gun, he dropped the gun. He stood at the door looking out at us, just couldnt't give himself up at that point," Milpitas Police Dept. Lt. Raj Maharaj said.
Police say that suspect wanted to turn himself in but couldn't until the door was unlocked about 3 and a half hours later.
Eventually, police were able to open the door and arrest him.
Police say there were four total burglars at 2 a.m. at the gun shop. Two were captured relatively quickly. The third suspect was taken into custody on N. Abel Street and N. Milpitas Blvd. at 4 a.m.
There were a lot of firearms accessible to them inside the store. However, police say the inventory is all accounted for inside the shop.
They're walking the railroad tracks behind the store to check if the suspect arrested on Abel St. dropped any weapons back there, as kids will be walking through the area on their way to school.
One Milpitas gun shop burglary suspect arrested at Abel & N Milpitas Blvd. 3 in custody. 1 surrounded in building. pic.twitter.com/MzlWbuZo6P— Matt Keller (@MattKellerABC7) February 24, 2016
The manager of the store arrived on the scene and says the owner is out of town. She has yet to talk to police to get any details about what took place inside the store and if there are any damages.