Nicole Lopez, a senior office specialist in the Santa Clara County Medical Examiner-Coroner's Office, said Friday that the killer's cause of death was a self-inflicted gunshot wound, AP reported.
Gilroy Police Chief Scot Smithee had previously said the shooter was shot and killed by three officers who responded in less than a minute, AP said.
On 28 July, at least 15 people were injured and four people killed - including a six-year-old boy - during a shooting spree at the annual garlic festival in the California town of Gilroy, located 80 miles southeast of San Francisco.
According to Smithee, the attacker accessed the venue by cutting through a barrier and began shooting people at random.
The suspected gunman, identified as a 19-year-old man, legally purchased the AK-47-type assault rifle in Nevada on 9 July, according to authorities.