NEW YORK — It was a muggy night in Harlem. A 61-year-old Black man had gotten jumped by two suspects. Disoriented and bleeding, he struggled to recount the attack for the large contingent of police who came to his aid. "This is not deserved for no one," the man told them.

A dark SUV rolled by. Its driver shouted expletives at the officers, having wrongly deduced they were preparing to arrest the victim. Another bystander, a White woman, documented the scene on video, telling a detective she was “concerned” because so many officers were there.

This is a common scene between the public and the police in New York, where springtime protests over racial injustice and excessive force by law enforcement have been eclipsed by an alarming surge in violent crime. Shootings are up more than 150 percent from mid-July to mid-August compared with the same period last summer. Yet the number of gun arrests has fallen, inviting fresh criticism of the city’s approach to fighting crime.

In June, the New York Police Department disbanded its controversial anti-crime unit — the plainclothes officers whose mission, to rid the streets of guns, once relied on a practice known as “stop and frisk” later exposed to have disproportionately targeted innocent Blacks and Latinos.

Instead, NYPD officials have moved to double down on community engagement, establishing a rapid-response team to connect with people in distress — such as the mugging victim in Harlem — and promoting one of the department’s most experienced and respected chiefs, Jeffrey Maddrey, to be the face of change.

The goal, officials say, is to project more soft power into New York’s most troubled neighborhoods and make a concerted effort to prove to those who remain suspicious of law enforcement — or outright resentful — that the police can be trusted again.

“People,” Maddrey said in a recent interview, “need to see the human side of police officers.”

The gun violence plaguing New York is reminiscent of the 1980s and ’90s. Authorities have recorded about 900 shootings so far this year, up from around 500 through the beginning of August 2019.

A 1-year-old boy was shot and killed in his stroller at a cookout in Brooklyn. A spate of drive-by shootings followed, striking five across three city blocks. In the Bronx, 17-year-old Brandon Hendricks, a basketball prodigy expecting to go Division I, was gunned down while walking near his home.

President Trump has threatened to deploy federal agents here — as his administration has done in other major cities he perceives as “going to hell” — unless local leaders can restore order. City officials have rejected the idea, and the NYPD insists a more gentle approach is the solution. Yet skepticism remains.

Christopher Ryan, who led the Manhattan district attorney’s violent criminal enterprises unit from 2010 to 2018, said that, in theory, the people who neighborhood coordination officers and other community-oriented officers get to know over time are more likely to trust them with information. A neighborhood-based law enforcement strategy is “absolutely an essential aspect of modern-day policing and policing in New York, without question,” he said.

But the former prosecutor, whose unit took down numerous violent street crews and gangs, called dissolution of the NYPD’s anti-crime unit a mistake.

“Anti-crime is to gun violence what infectious-disease people are to covid,” Ryan said, drawing a parallel to the ongoing public health crisis. “You can pull them, and you can pull all the infectious-disease people out of their work and reassign them to community health centers, and they’re going to do really good work — but they’re going to miss something.”

A smarter approach, Ryan said, would subject the anti-crime unit to more rigorous oversight of its practices and greater accountability for its officers. Neighborhood policing, he emphasized, won’t stop “the guy who two days from now . . . is going to go to the barbecue and shoot four people.”

Pastor Louie Negron, clergy liaison for the NYPD’s 48th Precinct in the South Bronx, shares that view. Negron, a former gang member who now “preaches peace,” said he is regularly called on to comfort the families of young men lost to gun violence. The city is relying on a loose network of violence “interrupters,” part of what has been referred to as the Cure Violence movement, to intercede in gang disputes. The theory is that local activists may be able to talk sense into members of street crews at odds with one another to prevent conflicts from turning deadly.

In his decade of service to the city, Negron has seen police develop fruitful connections with residents, but he warned that earning and preserving trust takes time and mutual investment. Relationships were damaged, Negron said, by the aggressive actions of some neighborhood coordination officers during the recent protests.

But disbanding the anti-crime unit “was the worst possible thing you could do,” Negron said. “All they did do was bring guns back onto the street.”

Negron attended an event last month with Maddrey, the NYPD’s new community affairs commander, and Mayor Bill de Blasio (D). Occupy the Corner was billed as a rally and outreach march through the streets, but he came away disappointed, he said, when things petered out before the march could happen.

Negron said he sees Maddrey as a “credible messenger” for the police, someone who earned a reputation while working the toughest neighborhoods in Brooklyn as a positive force and a resource, someone unafraid to be on the streets. And the two share a goal of reaching vulnerable young people before they turn to crime — or wind up dead.

Since Maddrey’s appointment, the chief has been visible around the city, encouraging residents to reach out and making it known that he is doing the same. After Tropical Storm Isaias knocked out electricity in parts of the city, he tweeted a video of an NYPD response team hauling a generator to the home of a double amputee dependent on dialysis. “We are here to protect and SERVE!” he wrote.

Maddrey was received like a celebrity during Occupy the Corner. Eric B., a major hip-hop artist who rose to fame in the 1980s and has experienced his own brush with the law, greeted the police chief warmly. Strangers asked for photographs. “Blue lives matter all day every day,” said one woman.

His brand of neighborhood policing was honed in Patrol Borough Brooklyn North, covering notoriously violent areas including Bedford-Stuyvesant, East New York and Brownsville. There, during the holidays, his team would distribute donated toys to disadvantaged kids. They would dress as superheroes and, at Halloween, welcome kids and families into the station to tour their haunted house.

Maddrey aims to be accessible, widely sharing his cellphone number with anyone who may need assistance. Since his promotion, his schedule has been packed with meetings all over the city. He recently did a Zoom call with youths in the Bronx, taking copious notes on their ideas for improving relations — including one child’s suggestion that officers spend “meaningful time” in people’s neighborhoods to truly “understand our culture.”

Abena Smith, who raised two sons in Harlem and, since 2010, has served as president of the 32nd Precinct Community Council, said that when she was growing up here, she and her neighbors knew the beat cops and believed they were a source of support to neighborhood families. It needs to be that way again, Smith said, noting, “This idea that this should be an adversarial relationship is completely misplaced.”

But the police need to understand that trust is fragile — and that hostile encounters have considerable consequences, she said. Neighborhood policing works only when both sides commit to addressing problems together. There needs to be genuine dialogue, Smith said, and it needs to start with the difficult questions about race.

“People have to start being comfortable with being uncomfortable,” she said.