The suspect accused of shooting 10 people at a Buffalo supermarket on Saturday afternoon has been identified as 18-year-old Payton Gendron. He is from Conklin, which is a small town about 200 miles (320 kilometers) southeast of Buffalo, not far from the Pennsylvania state line.

Authorities believe the shooting was motivated by hate and he had been planning it for months.

Wearing military gear, he livestreamed the shooting to a small audience on Twitch for several minutes before the platform cut off his feed.

Officials said the rifle he used in the attack was purchased legally but the magazines he used for ammunition were not allowed to be sold in New York.

Police said they found a 180-page manifesto in which Gendron had included a plan of the attack, detailing driving several counties away to carry it out. 

“The shooter traveled hours from outside this community to perpetrate this crime on the people of Buffalo, a day when people were enjoying the sunshine, enjoying family, enjoying friends,” Buffalo Mayor Byron Brown said at a press conference. 

“People in a supermarket, shopping and bullets raining down on them. People’s lives being snuffed out in an instant for no reason.”

Also Read: Two back-to-back Chicago shootings leave one dead, 10 injured

Erie County Sheriff John Garcia also called the shooting a hate crime.

“This was pure evil. It was straight up racially motivated hate crime from somebody outside of our community, outside of the City of Good neighbors … coming into our community and trying to inflict that evil upon us,” Garcia said.

The FBI is investigating the shooting as both a hate crime and racially motivated violent extremism.

He is currently being held without bail and has pleaded not guilty to first-degree murder. He is due back in court on Thursday and faces life in prison.