Christopher Keller, of Manorville, appeared in a Suffolk County courtroom for arraignment Friday.
Prosecutors say in November and December, Keller targeted one victim because that person was Jewish and another because Keller thought that person was gay.
It’s unclear, however, why others were targeted.
READ MORE: Producer Scott Rudin Will ‘Step Back’ From Broadway Duties After Allegations Of Abusive Behavior
“He shot a gun into establishments and residences throughout the county. He vandalized cars and posted extremely disturbing messages on Instagram,” Suffolk County District Attorney Timothy Sini said.
“This may have gone back and forth both ways. I think there’s a lot more to this case than we heard today,” said Glenn Obedin, Keller’s attorney.
No one was hurt in the shootings.
MORE NEWS: Man Arrested After Allegedly Using Anti-Asian Slurs, Harassing Undercover Officer In Queens
Keller faces up to seven years in prison if he’s convicted.