The gunman who police say opened fire at a popular garlic festival in Northern California and killed three people reportedly referenced a neo-Nazi manifesto on social media before the shooting.

Santino William Legan, who was shot and killed after engaging with police, had posted on his Instagram page about a 1890 racist manifesto titled “Might is Right or The Survival of the Fittest," according to multiple reports.

ADVERTISEMENT

"Read Might Is Right by Ragnar Redbeard," the 19-year-old said in an Instagram caption.

The post referenced a book by a pseudonymous author that is popular among neo-Nazis and white supremacists. Among other things, the book promotes violence and strength as a moral strategy. It is filled with anti-Semitic and misogynistic language.

NBC News also noted that "might is right" is a phrase that is often used to indicate white supremacy on neo-Nazi extremist forums.

Legan had also posted on Instagram about his disdain for the Gilroy Garlic Festival.

“Ayyy garlic festival time,” one post read. “Come get wasted on overpriced shit.”

The findings regarding Legan's social media activity came in the hours after he opened fire at random at a popular garlic festival in Gilroy, Calif. The shooting resulted in three deaths and several injuries.

Gilroy Police Chief Scott Smithee said Legan randomly fired on a crowd with a weapon that was legally purchased in Nevada. Smithee added that police were searching for a second suspect who may have been involved in the incident.

Instagram said earlier Monday that it had removed the Instagram account with the same name as the suspect identified by authorities.