A Trenton neighborhood "turf war" precipitated the shoot-out at an all-night arts festival early Sunday morning — and a Facebook post Saturday warned of it, city officials said Sunday.

It was not immediately clear if police and organizers of the Art All Night festival had been aware of the post and took any particular precautions. Attendees reported a heavy police presence at the site after midnight and up to the time of the 2:45 a.m. shooting.

The event, in its 12th year, usually draws 20,000 or 30,000 people to Trenton. A suspected gunman was killed — authorities believe by police — and 22 people were injured in the shooting that traumatized New Jersey's state capital and made national headlines.

Gov. Murphy visited a local baptist church Sunday morning and shooting victims in the afternoon, hoping to calm a city on edge as law-enforcement investigated the violent outbreak at the historic Roebling Wire Works.

"We need to be hugging each other right now," Murphy said departing Galilee Baptist Church.

>> READ MORE: Gunmen ID'd in Trenton arts festival shooting that left 1 dead, 22 injured

Mayor-elect Reed Gusciora said in an interview at the church that the shooting "appears to be a turf war" between neighborhood gangs. "It's a concern," he said. "We are about to enter the summer and we have to change the mindset of Trenton so that people don't solve things with violence, particularly gun violence."

Jerell Blakeley, a just-elected councilman-at-large, said that there had been "rumblings of hostility" at the festival in online comments on Saturday, showing on his phone a Facebook post that said: "Please. Please. Please. Do Not Go to the Art All Night. They will be shooting it up."

Gusciora, who takes office with Blakeley in July, also was aware of the social posting as were other officials.

>> READ MORE: 'I could feel percussion of the shots,' Trenton festival shooting witness says

Mayor Eric Jackson said the shooting appeared to be a "local dispute" that spilled into the art festival, noting that Trenton hadn't previously had a single shooting of this "magnitude." He called the arts festival "a great event" but it might need to tighten security and perhaps change its hours.

Officials also called for tighter gun control and more outlets for children and teenagers in the summer.

Editors note: The name of Trenton mayor-elect Reed Gusciora was misspelled in earlier versions of this article.