A longtime crime-ridden Brooklyn neighborhood is getting $9 million from City Hall for safety measures in wake of a wild shoot-out at a packed block party there last week that left 11 injured and one dead.

Mayor Bill de Blasio, Council Speaker Corey Johnson, and other city pols on Tuesday announced new funding for Brownsville they say will bolster and expand services supported by the Mayor’s Office to Prevent Gun Violence and the Mayor’s Action Plan for Neighborhood Safety.

It includes $5.2 million to renovate the Brownsville Houses Community Center and $140,000 for new NYPD security cameras and public lighting around the Brownsville Playground site.

The camera and lighting upgrades are expected to be completed by year’s end.

“Our hearts ache for Brownsville, but this community will be defined by resilience, not tragedy,” de Blasio said in a statement hours before formally announcing the funding at Brownsville event with Police Commissioner James O’Neill.

“These programs will build on our commitment to end the epidemic of gun violence and lend much needed support to the local leaders and activists who work to bring positive, enduring change to the Brownsville community each and every day.”

The funding also includes $1 million in new funding to expand a city-run violence disruption program in Brownsville’s 73rd Precinct. It also includes another $1 million to boost the Health Department’s Brooklyn Neighborhood Health Action Center, and $590,000 for Brownsville Neighborhood YouthStat, which trains youth in community organizing and crime prevention.

The horrific shooting unfolded just before 11 p.m. on July 27 as the annual “Old Timers Day” party was wrapping up its second day with thousands in attendance.

More than 100 officers were patrolling the block party when the gunfire erupted, which O’Neill has said prevented more people from being shot.