The teen gunman who fatally shot three people at California’s Gilroy Garlic Festival killed himself — contrary to earlier police reports that said authorities fatally shot him, according to the Santa Clara County coroner’s office.

Santino William Legan, 19, barged into the food feast last Sunday and used an AK-47-style assault rifle to slaughter his victims, including a 6-year-old boy and a 13-year-old girl. Legan’s rampage left another 12 people injured, one critically.

Gilroy Police Chief Scot Smithee had told reporters the lone gunman was shot dead by three officers who quickly responded to the Christmas Hill Park event.

But on Friday, Nicole Lopez of the Santa Clara County Medical Examiner-Coroner’s office, said Legan’s official cause of death was a self-inflicted gunshot wound.

With Post wires