Raul Marroqin, 43, who attended the funeral, said that he heard the gunfire, but had not seen who was shooting.

“I heard so many shots,” he said. “Bop, bop, bop, bop, bop. I threw myself to the floor, grabbed my kids.”

The victims included two 40-year-old men who were pronounced dead at Kings County Hospital Center. Two women, ages 38 and 29, and two other men, ages 37 and 44, were also hit. One of the victims was in critical condition. Their names were not immediately released.

Police Department officials said that 15 rounds were fired, and that several cars quickly left the scene after the shootings. The police said that it appeared there was more than one gunman, but they did not know the motive for the shootings. They cautioned that the investigation was in its early stages and that details could change.