The 22-year-old man who was found with non-life threatening injuries on Saturday evening near the Old Navy store had shot himself, according to police.
"Further investigation by detectives from the Special Investigations Unit revealed the 22-year-old male sustained a self-inflicted gunshot wound and was not the victim of an act of violence," the Milpitas police said in a statement.
The gunfire created chaos at the mall on what would normally be a busy day with just days left before Christmas. Some shoppers ran for the exit, telling KTVU they heard multiple gunshots.
Other customers and retail employees were forced to shelter in darkened stores for more than four hours. Police went store to store, searching for a possible shooter and escorting people to safety outside.
There were two other medical emergencies in the mall, police said, but they were unrelated to the shooting. Those patients were taken to a hospital.
Police did not reveal whether the man injured by the gunfire would face any criminal charges.