Image copyright Art All Night Image caption This photo, taken before the shooting, was posted on the event's Facebook page

At least 22 people, including a 13-year-old boy, were injured in a gun attack at an all-night arts festival in Trenton, in the US state of New Jersey.

Police say at least three men opened fire at around 03:00 local time (07:00 GMT) as 1,000 people were enjoying the local art, music and food.

The authorities said the violence is likely to have been gang-related.

One of the suspects, 33-year-old Tahaji Wells, was shot dead and another is in a critical condition.

A third individual - Amir Armstrong, 23 - is in custody, a local prosecutor said.

Four of the injured, including the teenager, were admitted to hospital in a critical condition.

Officials said 17 of the wounded had been shot and others injured by trampling.

Police initially put the injured toll at 20, but raised it after two more victims arrived at local hospitals.

Several weapons were said to have been found at the scene.

There were also reports of an attempted carjacking nearby, but it is not clear if it was linked to the shooting.

Image copyright AFP Image caption The event has now been cancelled

One of the injured, Irving Higginbotham, said he was shot four times.

"Everybody was having a nice time," he told Action News.

"The next thing you know, there were gunshots, got shot in the leg, fell on the ground, and that was it."

Angelo Nicolo was attending the event with his brother. He told US media that they heard loud popping sounds and people started running down the street.

"I saw two police officers escort a guy that got shot in the leg. They bandaged him up and whisked him away," Mr Nicolo said.

Read more about US gun violence

This was the 12th year of the Trenton Art All Night Festival, an event that raises money for local artists. It began on Saturday afternoon and was due to run until Sunday afternoon, but has now been cancelled.

Shootings are not uncommon in Trenton. The city has endured longstanding issues with gun crime, even though the state of New Jersey is judged to have the second tightest gun restrictions in the US, according to the Giffords Law Center to Prevent Gun Violence.

Shooting followed online warnings

One of the gunmen, Tahaji Wells, had recently been released from prison on parole. He was sentenced to 18 years in 2004 after pleading guilty to aggravated manslaughter, NJ.com reported.

Trenton's Mayor-elect Reed Gusciora said there had been warnings of violence at the event over the weekend. He said he had seen a screenshot of a Facebook post which read: "Please. Please. Please. Do Not Go to the Art All Night. They will be shooting it up."

He said police had been pre-warned of threats.

Image copyright AFP/Getty Images Image caption Officials said threats of violence had circulated online before the shooting

In a news conference on Sunday, Mercer County prosecutor Angelo Onofri said there were "numerous physical altercations" prior to the shooting, "both inside and outside of the venue".

He said police had told organisers the event needed to be shut down and tried to move people on - but some remained, and the shooting followed.

The organisers said, on their Facebook page, they were "shocked" and "deeply saddened" by what had happened.

"Our hearts ache and our eyes are blurry but our dedication and resolve to building a better Trenton through community, creativity and inspiration will never fade", they added.