FILE - In this July 28, 2019 file photo, the remains of a party litter a playground after a shooting in the Brownsville neighborhood in the Brooklyn borough of New York. New York City police have made an arrest in the community festival shooting that left one person dead and 11 wounded this summer. Police said Wednesday, Oct. 16, that 20-year-old Kyle Williams, of Brooklyn, was arrested on murder, criminal possession of a weapon, reckless endangerment and attempted murder charges. (AP Photo/Mark Lennihan, File)

NEW YORK (AP) — A 20-year-old gang member has confessed to being one of two shooters in a gunfight that turned a lively summer community festival in Brooklyn into a blood-drenched nightmare, police said Thursday.

One person died and 11 were wounded when Kyle Williams and a second, yet-unidentified gunman opened fire, possibly on each other, during the Brownsville neighborhood's annual Old Timers Day celebration July 27, police said.

Police arrested Williams on Wednesday and he confessed to the shooting during questioning, Deputy Chief Michael Kemper said.

The investigation into the mass shooting had appeared stalled for a time, but Kemper credited "old-fashioned detective work" and help from the public for cracking the case after 80 days without an arrest.

The gunfire incited a panic in a crowd of thousands of people who had gathered in the area around a playground and community center for music and food. Flying bullets cut down partygoers as they fled the event, held annually for 56 years as a reunion for people who grew up in the Brownsville neighborhood.

Jason Pagan, 38, was fatally struck. Six men and five women, ages 21 to 55, were hospitalized with gunshot wounds.

Police said a chance encounter between rival groups led to the gunfire. Williams admitted to being the one who shot Pagan, Kemper said.

Investigators have identified someone they believe is the second gunman but have not made an arrest, Kemper said. That person was associated with Pagan's group, while Williams was involved with a rival group, he said. Pagan did not fire any shots.

"Both these groups don't like each other," Kemper said at a news conference Thursday. "Words were exchanged. Guns were displayed. Shots were fired. And this incident occurred."

Williams is expected to be arraigned Thursday on charges of murder, criminal possession of a weapon, reckless endangerment and attempted murder, the Brooklyn prosecutor's office said.

It wasn't clear whether he had a lawyer who could comment.

Police offered thousands of dollars in rewards for information, but the big break came after the department circulated pictures of two women seen on video at the park around the time of the shooting, Kemper said. He didn't elaborate on how tips about those women allowed investigators to make a connection to Williams.

Chief of Department Terence Monahan said he was angered and outraged by a "senseless act of violence." Though the department does not have an official definition, he said, the Brownsville fusillade was certainly a mass shooting.

Williams' 9mm handgun fired 10 times, Kemper said. The other gun, a .40-caliber semiautomatic used by the second shooter, was fired five times, he said.

"I'd like to make something clear to any gang member and violent criminal in New York City," he said. "If you believe you can carry an illegal gun, cause violence and instill fear in our communities, you couldn't be more wrong. Regardless of the time that passes, we will find you, arrest you and you will go to jail."

Police said earlier in the investigation that Pagan had recently been let out of prison and the shooting might have been related to a gang dispute. Pagan was a member of the Bloods gang and several other victims had gang histories, police said.

Williams is a "self-admitted gang member," Kemper said, declining to identify his gang affiliation. The address police listed for him is about a 10-minute walk from the playground.

___

Follow Michael Sisak at twitter.com/mikesisak

FILE - In this July 28, 2019 file photo, a police officer walks by yellow evidence markers at a playground after a shooting in the Brownsville neighborhood in the Brooklyn borough of New York. New York City police have made an arrest in the community festival shooting that left one person dead and 11 wounded this summer. Police said Wednesday, Oct. 16, that 20-year-old Kyle Williams, of Brooklyn, was arrested on murder, criminal possession of a weapon, reckless endangerment and attempted murder charges. (AP Photo/Mark Lennihan, File)