TRENTON, N.J. — At least two gunmen fired into a crowd outside a bar in New Jersey’s capital city, wounding 10 people, two critically, but the motive for the shooting remains unknown, authorities said.

Mercer County Prosecutor Angelo Onofri said a vehicle pulled up to the corner outside Ramoneros Liquor and Bar in Trenton at about 12:25 a.m. Saturday and when the shooters fired more than 30 shots before fleeing.

Five men and five women were taken to a hospital with gunshot wounds. Two of the male victims were listed in critical but stable condition while the others were in stable condition.

Police Director Sheilah Coley said the 10 victims — eight Trenton residents, one person from Ewing Township and one from Willingboro — were “just out for a night of fun and then it turned into a night of violence.” She said police were looking at surveillance footage and trying to identify the vehicle. State police were now providing help in patrolling the city, she said.

Mayor Reed Gusciora said police were investigating whether gang rivalries could have been behind the shooting, since “this is a bar where many outsiders from neighborhoods all co-mingle.”

Coley, however, cautioned that some witnesses reported that the driver of the car had been beeping the horn due to backed-up traffic.

“So we’re not saying that this is road rage and we’re not saying that this is a retaliation, because the truth of the matter is we just don’t know at this point,” she said.

The shooting came almost a year after gunfire erupted at a 24-hour music festival in New Jersey’s capital city, killing one suspect and injuring nearly two dozen people. About 1,000 people were attending the June 17 Art All Night festival that showcases local art, music, food and films. Authorities said the shooting stemmed from a neighborhood gang dispute.

Gusciora said officials had to address “socio-economic problems where many young people have given up hope.”

“Trenton cannot become a tale of two cities: one that is moving toward progress in economic development and improvements in education, while at the same time an unsafe environment for young people due to gun violence,” he said. The mayor added, however, that despite New Jersey’s strict gun laws, weapons come in from surrounding states with fewer restrictions, “and ultimately it’s going to have to be the federal government that’s going to have to step up to the plate.”

At-large city council member Jerell Blakeley said on Facebook that “Every time the weather breaks, the madness descends in this city.” He said such “carnage” is becoming a more common occurrence, and improving the situation would take “a multifaceted and strategic deployment of resources in the government, education, social service, conflict resolution, mental health and law enforcement arenas.”