“Growing up is an anomaly in our neighborhoods,” she said. “And so for individuals who are in their 40s, 50s, 60s and 70s to be able to enjoy themselves and come back and just connect is a seminal moment for us.”

The shooting, she continued, “has shocked our community to its core.”

The violence — one of at least two deadly gun battles over the weekend in New York — quickly eclipsed what was becoming a success story in Brownsville, a neighborhood scarred by decades of official neglect, deep poverty and street violence. Shootings had been declining this year in the neighborhood despite a slight rise in gun violence across the city.

More than 100 police officers were on duty at the party when the shots were fired minutes before 11 p.m. near the intersection of Christopher and Hegeman Avenues, where about 2,000 people had gathered in and near the Brownsville Recreation Center, at the edge of a playground, the police said.

Mr. Pagan was shot in the head as he was waiting for an Uber, according to the police and Ms. Walker. He was the second of his siblings to die in a shooting, she said.

Mr. Pagan’s death was a painful turn of events on an already somber occasion for Ms. Walker: Her 19-year-old brother was shot and killed 32 years ago to the day on Saturday, a murder that left his 11-month-old twin sons without a father, she said.

“I’m hurt,” Ms. Walker said. “I’m mourning.”

The police did not say whether any of the victims — seven men and five women who ranged in age from 21 to 55 years old — had been the targets of the gunfire, or if the gunmen had indiscriminately strafed the crowd with bullets.