Officers in at least two police departments knew about a township teacher’s Facebook post warning people not to attend Trenton’s Art All Night festival because “they will be shooting it up” within roughly an hour of it being shared online.

Startling new details emerged Wednesday afternoon forcing officials to acknowledge cops from Hamilton and Trenton police departments had learned about Wilson Elementary teacher Danielle Grady’s widely circulated Facebook post as early as Saturday afternoon, about 14 hours before a firefight broke out around 2:45 a.m. Sunday at the arts festival inside a warehouse of the Roebling Market.

Investigators wanted to know whether Grady had advance warning of the mass shooting that injured at least 22 people, including a teenager. Most of the victims have been treated and released from the hospital.

Hundreds of people saw and commented on the post, but city police director Ernest Parrey Jr. said at a news conference Tuesday at the Friendship Baptist Church he was “not aware” of any calls to police forewarning of potential violence.

Mercer County prosecutor Angelo Onofri admonished the township teacher at the same presser for not alerting police.

Hamilton school officials Wednesday morning said Grady had been sidelined from teaching for the rest of the year after officials criticized her for not alerting police to the potential threat.

In an interview Wednesday afternoon, Onofri acknowledged his office has since learned a retired Hamilton cop forwarded the teacher’s post to the school resource officer at Hamilton High School West Saturday afternoon.

David Barlow is the school resource officer for Hamilton High School West.

Grady’s attorney pounced on officials in an exclusive interview with The Trentonian for allegedly scapegoating Grady.

In addition to the intelligence the retired Hamilton cop passed along, The Trentonian learned Trenton Police officer Jamar Booker told his supervisor, Peter Weremijenko, about the threat around 8 p.m. Saturday night after seeing Grady’s Facebook post online, attorney Robin Lord said.

Crediting Booker for “doing his duty” by reporting the post to superiors, Lord proceeded to accuse officials of deceiving the public over what they knew and when about Grady’s ominous message warning people “they will be shooting it up” hours before the art festival firefight.

“They did nothing. They did absolutely nothing. They had notice in advance there was going to be a shooting, and they didn’t do a godd—n thing,” Lord said. “They had some nerve using her as a scapegoat.”

Onofri faulted Grady for posting the warning on social media but not alerting cops to the potential threat.

“If you see something, if you hear something, say something,” he said at the presser. “Why a person would post on Facebook if they were this concerned about violence breaking out at this event, there were only three numbers they needed to remember, and that’s 911.”

Onofri said the township teacher was on vacation in North Carolina when she made the post Saturday around 11:25 a.m.

Prosecutors Skyped with Grady following the shooting and planned to formally interview her Tuesday. But she stopped talking to them and lawyered up.

Grady, who has not been charged with a crime, didn’t respond to a message. Her lawyer, however, went to bat on her behalf.

Lord said the teacher cancelled an appointment with prosecutors to give a statement because, “They were treating her like a criminal.”

The Trentonian was the first news outlet to publish the teacher’s foreboding Facebook post that said: “Please please DO NOT GO TO ART ALL NIGHT! THEY WILL BE SHOOTING IT UP!”

Grady’s words turned prophetic when feuding factions opened fire Sunday morning. Lord insisted her client didn’t have firsthand knowledge ahead of the shootout and only heard rumors floating on Facebook.

“She was posting based upon information she read,” Lord said. “It was something she had read and passed it on.”

Asked why the teacher didn’t contact the cops, Lord said Grady “assumed law enforcement knew because it was sent to law enforcement” by Booker.

The art festival shooting sent shockwaves through the community as leaders called for calm and healing.

Two men have been charged in connection with the melee that led to the death of one of the gunmen. Amir Armstrong, 23, and Davone White, 26, have been charged with weapons offenses while the third suspect, Tahaij Wells, was killed by police during the gun battle that sent a large crowd stampeding for safety. Armstrong and White, who both have had prior brushes with the law, remain hospitalized. Armstrong is in critical condition while White has been stabilized, officials said.

Wells was a reputed Bloods gangster known on the streets as N.O.R.E. in honor of Queens-based rapper Noreaga. Wells had denounced the gang while in prison serving time for aggravated manslaughter, most of it spent in solitary confinement.

The Bloods allegedly put a prison “hit” out on Wells for carrying out an “unauthorized” execution of fellow Bloods gangster Robert McNair.

Wells and his attorneys disputed it was a gangland slay in successfully pushing for him to get out of solitary confinement months ahead of his February release date.

Onofri said his office was contacted through its website Wednesday around 2 p.m. by the retired Hamilton cop. The prosecutor wouldn’t name the cop but relayed how the cop had alerted the Hamilton West police resource officer of Grady’s post at 12:28 p.m. Saturday, or about 63 minutes after Grady posted it online.

The prosecutor acknowledged some information “may have been forwarded to Trenton” but insisted he wasn’t aware of that when he spoke during Tuesday’s presser.

Lord didn’t see it that way.

“I think that the Mercer County Prosecutor’s Office should get their facts straight before they start throwing stones in the direction of civilians who are just trying to make a living,” a fuming Lord said.

The consequences of officials’ finger-wagging have been stiff for Grady. Hamilton superintendent Scott Rocco said via email Wednesday morning the “employee in question will not be in her teaching assignment for the rest of the school year.”

Friday is the last day of classes, but teachers are appointed to work from Sept. 1 through June 30, meaning Grady is getting sidelined for the final 10 days of her contracted work schedule.

Rocco didn’t say in the email whether Grady would be paid for the remainder of the school year or whether the school will take disciplinary action against her. But Lord confirmed she was suspended with pay.

Onofri said at the presser he didn’t know whether police knew about the post prior to the shooting, though many people had apparently heard of or read the post. Even Mayor-elect Reed Gusciora said he received a Snapchat message of it from a Trenton teacher the morning after the firefight.

The prosecutor’s characterizations apparently miffed one rank-and-file cop who refused to stay silent. Lord claimed Booker was “mortified” over officials’ statements and contacted Trenton Police internal affairs to tell them what he knew. “He’s not going to let it go down like this,” Lord said.

Neither Booker nor a Trenton Police spokesman could be reached for comment.

Earlier in the day, Gusciora told The Trentonian it was important for investigators to determine whether Grady knew something more than what she shared on Facebook.

“All eyes are on her,” he said. “I’d be a little concerned about coming back to work. I’m sure she’s going to have a guilt trip for the rest of her life. I would hold off judgement until I find out more information. But if she had specific knowledge, it would be like me posting something like that.”

Gusciora had been at the event Saturday for about an hour starting around 7:30 p.m. He noticed a heavier police presence of about a dozen cops which was different from previous years.

Other questions still linger about whether more could have been done to prevent the shootout. Event organizers hired only four overtime police officers as security for an event that has attracted tens of thousands of people over the years, officials said. Organizers haven’t returned phone calls requesting comment about why more cops weren’t hired to staff the event.

Gusciora felt nothing could have prevented the shootout.

“No,” he said. “That’s something that, if an idiot is determined to shoot up a club, a school or an art festival, they have no conscience or respect for any kind of authority.”

Onofri credited the 40 cops, some of whom have been placed on paid administrative leave, for rapidly responding to the shooting and for preventing more carnage.

Grady began employment with the Hamilton Township School District in September 2013 as a health and physical education teacher at Steinert and Hamilton West high schools. She was also assistant coach of the track and winter track teams at Hamilton West during the 2013-14 schoolyear, according to school board records.

She started teaching at Wilson Elementary in September 2016 after getting transferred from Hamilton West, records show.

Her current annual salary is $49,596, and she also collected a $7,350 stipend for being the Hamilton West boys track head coach and $5,528 for being a Hamilton West winter track assistant coach in the 2017-18 schoolyear, according to school board documents.

Trentonian staff writer Sulaiman Abdur-Rahman contributed to this report.