TWO gunmen have opened fire at an all-night arts and music festival in the US, sending people running over each other in the scramble to safety. One suspect was killed and 22 people were injured.

Of 17 people treated for gunshot wounds early on Sunday morning in New Jersey, four of them, including a 13-year-old boy, remain in critical condition late on Sunday morning, said Mercer County prosecutor Angelo Onofri.

The shots rang out around 2.45am during the Art All Night Trenton festival that showcases local art, music, food and films. Onofri said a 33-year-old man was killed, apparently by police, and the second suspect is in custody. He said a "neighbourhood beef" is behind the shooting.

On Sunday, crime scene tape surrounded the site of the historic Roebling Wire Works Building that now shares a parking lot with a supermarket, bank and laundry.

Police are also investigating an attempted carjacking that occurred in a nearby alley. Onofri said police are working to determine if it's connected to the shooting.

Gennie Darisme was getting ready to leave the festival around 2.45am when she heard shots and saw people running.

"There were people trampling other people, cars hitting other cars," she said.

When she was walking back to her car after the shots stopped, Darisme said she saw someone bleeding on the ground, in handcuffs.

"People were running to him, trying to see his face, to see if he's a family member or a friend," she said.

Theresa Brown, who has been volunteering at Art All Night for 12 years, said she was leaving her volunteer shift around 2am when she heard "pop, pop, pop. I thought it was a car backfiring," she said.

The remainder of the two-day festival has been cancelled.

A spokeswoman for St. Francis Medical Center in Trenton said 10 men and women, ranging in age from 17 to 48, were being treated for minor injuries. They were in various stages of being released, she said.

One man with a gunshot wound was transferred to Cooper University Hospital in Camden.

Capital Health Systems spokeswoman Kate Stier said they have "at least 16" patients there, including the 13-year-old boy in critical condition. That total may not include people treated and released.