A warning posted on Facebook by a schoolteacher hours before Sunday's early-morning shooting at a Trenton arts festival that left 22 people injured and one man dead prompted an increased police presence at the popular event and likely saved lives, the Mercer County prosecutor said Thursday in a reversal of his prior criticism of the teacher for not going directly to the police.

The Hamilton Township teacher, identified as Danielle Grady, wrote on Facebook about 11:25 a.m. Saturday: “Please  Please DO NOT GO TO ART ALL NIGHTTHEY WILL BE SHOOTING IT UP!”

Angelo J. Onofri, the Mercer County prosecutor, said he learned on Wednesday that a retired Hamilton Township police officer saw the post and passed the information along to the Trenton Police Department around 2 p.m.

"Trenton police officers acted on the information immediately, ultimately resulting in an enhanced police presence at the event," Onofri said through his spokeswoman.

Onofri explained that Grady believed her post would be viewed by multiple police officers who are among her Facebook friends.

"Without Grady's warning, additional deaths and injuries would likely have occurred," Onofri said.

Onofri had previously scolded Grady for not contacting law enforcement.

"If the woman had these kinds of concerns, she should have called the Trenton police," Onofri said.

Robin Lord, a lawyer for Grady, told the Trentonian newspaper on Wednesday that Grady made her post based on rumors she saw on Facebook and that she had no firsthand knowledge about what might happen.

Gunfire erupted at the Art All Night event held at Roebling Wire Works about 2:45 a.m. Sunday. Authorities said 17 people were wounded and at least five were injured in the panic that ensued. About 1,000 people were in attendance at the time. The 24-hour annual festival typically draws up to 30,000 people.

Tahaij Wells, 32, a suspected gunman and a member of the Bloods gang, was fatally shot by police. Amir Armstrong, 23, who was critically wounded, faces firearms charges in connection with the shooting.

On Tuesday, Onofri announced that Davone White, 26, of Trenton, was charged with unlawful possession of a weapon and a large-capacity magazine that could hold 30 rounds. White remained hospitalized in stable condition with gunshot injuries.

Four officers involved in the fatal shooting of Wells have been placed on paid administrative leave while investigators review whether the use of deadly force was justified.

Wells was released from prison in February after serving time in connection with a fatal shooting committed when he was 17. While behind bars, he remained involved with the Bloods and helped run the gang from prison.

The investigation into the festival shooting is continuing.

Officials have vowed to continue supporting the free festival, which features visual artists, short films, and a diverse range of live musical acts.