The alleged perpetrator of a shooting massacre at a Gilroy, California, outdoor festival Sunday had previously promoted an extremist text on his Instagram page.

Authorities on Monday morning identified the shooter as 19-year-old Santino William Legan. He allegedly killed three people, including a six-year-old boy and a thirteen-year-old girl, and injured 12 others at the Gilroy Garlic Festival.

Legan was engaged by police less than a minute after his rampage began, Gilroy Police Chief Scot Smithee said at a press conference Monday.

“As soon as he saw the officers, he engaged the officers and fired at the officers with that rifle,” Smithee said of the shooter. The chief noted the gunman’s “assault-type rifle” was purchased legally in Nevada earlier this month.

Multiple reports indicated that an Instagram account apparently belonging to the shooter, which has since been deleted, instructed visitors to read the work “Might is Right by Ragnar Redbeard.”

“Why overcrowd towns and pave more open space to make room for hordes of mestizos and Silicon Valley white twats?” he reportedly wrote.

The caption was accompanied a picture of Smokey the Bear holding a sign with the words, “Fire Danger High Today.”

The book “Might Is Right, or The Survival of the Fittest,” advocates using violence to establish the hierarchy of society and is deeply racist and misogynist, saying at one point that “for the welfare of the breed, and the security of descent, they [women] must be held in thorough subjection.”

The social darwinist theories the book espouses are shared by some extremist pagan traditions and Naziism, among other violent movements.

The lead singer of the band on stage at the time of the shooting, Tinman’s Jack van Breen, told KPIX that he heard someone shout during the massacre, “Why are you doing this?”

Van Breen said he heard the response, “Because I’m really angry.”

Multiple reports said the shooter’s brother is the amateur boxer Rosino Legan. The Gilroy Dispatch profiled Rosino two years ago and noted his campaign against rising tuition and housing fees at Santa Clara University and elsewhere.

A friend of Rosino’s told the Los Angeles Times that he called Rosino after hearing about the shooting. Rosino and his cousin, the friend said, were searching for his little brother.

“They wanted to be sure he was OK. That was the last contact I had with him,” Rosino’s friend told the paper. “And then I learned this morning it was Santino who did the shooting — it was shocking.”