TRENTON — Police said they knew about a Facebook post warning people way from an all-night arts festival hours before a police-involved shooting rampage left one dead and nearly two dozen injured.

Mercer County Prosecutor Angelo Onofri on Thursday said that Trenton police increased security in response to the Facebook warning.

The message was posted on the personal account of a Hamilton teacher who happened to be in North Carolina at the time.

"It appears that (Danielle Grady) did take steps that some of the people on her Facebook feed were law enforcement officers and she was calculating (the message) would get to them. And it does appear that the Trenton police did take some action based on that post," Onofri said.

After the news conference, his office released a statement further hailing the teacher.

"Without Grady’s warning, additional deaths and injuries would likely have occurred," the office said Thursday.

Earlier in the week, Onofri had suggested that Grady should have directly notified police, leading her attorney to tell The Trentonian newspaper that Grady was being scapegoated by police.

Hamilton schools Superintendent Scott Rocco said Grady has been removed from the classroom for the remainder of the school year. The statement did not explain why.

Mayor-elect Reed Gusciora said he's been attending the festival for years and said the increased police presence was noticeable this year.

The gangland shooting injured 22 people and sent the estimated 1,000 people in attendance scrambling for cover. Of those injured, 17 were hit by gunfire.

Suspected gunman Tahaij Wells, 33, was fatally shot by police. He had been released in February after his sentence for homicide-related charges ended.

Amir Armstrong, 23, and Devonne White, 26, of Trenton, were charged with weapons offenses.

Onofri told The Trentonian earlier that a retired Hamilton police officer saw the teacher's post, which read "Please, please DO NOT GO TO ART ALL NIGHT! THEY WILL BE SHOOTING IT UP!" A screenshot on the newspaper's website said it was posted at 11:25 a.m. on Saturday. The 24-hour festival opened at 3 p.m. Saturday and the shooting happened after hours after midnight.

The retired officer alerted the Hamilton police resource officer at Hamilton High School West. Grady's lawyer, Robin Lord, told the newspaper that a Trenton officer also told his supervisor about the message on Saturday night around 8 p.m.

Onofri did not disclose where Grady, a physical education teacher at the Wilson Street Elementary School in Hamilton, got her information. He said the source of information posed by anyone on social media is an important part of police investigations.

"The police, unfortunately, don't have the resources to monitor Facebook and social media 24 hours a day so you do have to kind of rely on the concerned citizens to do those postings and hope that the police do see it," he said.

The festival was in the process of being shut down around 1 a.m. because of an increase in fights and a "shift in the mood" inside the Roebling Wire Works Building on South Clinton Avenue.

"I think Trenton police did everything they could to protect the public and if they weren't there who knows what could have happened. It could have been a lot worse," Gusciora said.

The incoming mayor said he hopes the festival continues but said security procedures will need to be reviewed.

Onofri has not provided a timeline of events. As is the case in most police shootings in the state, the officer who shot Wells has not been publicly identified.

"Things are still under investigation by the Mercer County Homicide Task Force. The names of the officers involved and other details, including body worn camera footage, will be released when the initial officer-involved shooting investigation is substantially complete. We anticipate that information will be released early next week," prosecutor's spokeswoman Kathleen Pertucci said in an email.

Contact reporter Dan Alexander at Dan.Alexander@townsquaremedia.com or via Twitter @DanAlexanderNJ