A 44-year-old man was arrested in connection with a shooting that wounded eight people, including four children, at a Fourth of July barbecue in Coney Island, Brooklyn, authorities said Wednesday.

The suspect, Robert Smith, allegedly opened fire in a courtyard of an apartment building on West 30th Street near Surf Avenue at approximately 10:35 p.m. while fireworks were going off nearby. The courtyard, surrounded by steel bars, was the site of a family gathering just a block from Coney Island’s well-known boardwalk and beach.

Eight individuals were struck by gunfire. Among the injured were a 21-year-old woman shot in the chest who remains hospitalized in critical condition, a 6-year-old boy with a stomach wound, a 7-year-old boy shot in both legs, a 12-year-old boy wounded in the leg, and a 14-year-old boy hit in the thigh. Additionally, a 25-year-old woman sustained a leg injury, a 33-year-old man was shot in the chest, and a 37-year-old man suffered a shoulder wound, according to police statements.

Eyewitnesses described chaotic scenes as the shooting unfolded. Dejahn Williams, 22, whose sister was critically injured, recounted the panic as people tried to protect children and others around them. “My mom was making everybody plates,” Williams said. “Everybody just got down. We see blood going everywhere. People got hit.” A woman who identified herself only as Tiffany, mother of the critically injured woman, described the event as a family barbecue disrupted unexpectedly by gunfire. “I was serving food to the kids — and, next thing you know, gunshots just came out of nowhere. We didn’t even know it was gunshots because it’s the Fourth of July,” she said.

Witnesses reported that the shooter was dressed entirely in black and wore a black ski mask while firing through the bars of the courtyard fence.

Smith faces multiple counts of attempted murder. Police indicated his arraignment was scheduled but had not yet taken place as of Wednesday evening.

The incident occurred within a few blocks of the location where 24-year-old drill rapper Truron Roach-Martin, known professionally as Briscoe, was fatally shot earlier on the same day. Police Commissioner Jessica Tisch described Roach-Martin’s killing as gang-related and noted that investigators are exploring possible links between his death and the mass shooting at the barbecue. However, the family hosting the barbecue expressed doubt about any connection, stating they are unaware of any motive or reason they might have been targeted.