Nicole Lopez, a senior office specialist in the Santa Clara County Medical Examiner-Coroner's Office, said Friday that Legan's cause of death was a self-inflicted gunshot wound.
The medical examiner's office found that Legan died from "an intra-oral gunshot wound to the head" and ruled the manner of his death a "suicide."
Gilroy Police Chief Scot Smithee had previously said Legan was shot and killed by three officers who had responded in less than a minute. Smithee has called the officers "heroes" for preventing additional casualties by taking down the shooter.
In a Friday afternoon news conference, Smithee told reporters he doesn't think the medical examiner's findings contradict police accounts.
"The suspect turned his attention toward our officers," Smithee said, describing the moment his officers began firing on Legan. "The suspect went down to the ground, but he still had the rifle with him. And sometime during that process, he was able to get one more round off and shoot himself in the head."
"I don’t think that changes anything about the heroics of our officers in engaging him."
Authorities arrested a man earlier this week on suspicion of making threats online that apparently referenced the deadly shooting.
Jose Pinon, 40, of Gilroy posted Wednesday on Facebook that "my goal is to kill 500, not three."
Gilroy police Capt. Joseph Deras said officials did not seize any weapons from Pinon's home Thursday and do not believe he was planning an attack.