When New York City’s mayoral race began in earnest late last year the city was still convulsed by the murder of George Floyd and cries to “defund the police” rang out from the Bronx to Battery Park.

Now, as Tuesday’s Democratic party primary nears, Eric Adams — a black former policeman who has called for more NYPD officers — is one of the favourites to win a contest that has become a referendum on New Yorkers’ attitudes towards policing and public security.

Several polls have shown Adams leading a crowded field as a surge in shootings and hate crimes has pushed public security to the top of voters’ concerns while the response to the coronavirus pandemic, once the leading issue, has faded.

From the party’s moderate wing, Adams is vying with entrepreneur Andrew Yang, and Kathryn Garcia, a former head of the city’s sanitation department whose campaign appears to be gaining late momentum. All have proposed various reforms to improve policing, from better training to raising recruitment ages and imposing stiff penalties for bad officers. Yet they have remained rhetorically supportive of the police force and its role in the city, and have rejected progressive calls to cut its resources.

“Nothing works in our city without public safety, and for public safety we need the police,” Yang declared last month after the daylight shooting of a four-year-old girl in Times Square.

Garcia, meanwhile, has dismissed “defunding” as not serious, saying: “Black lives matter, full stop . . . But we still need safe policing.”

To their left is Maya Wiley, the former chief lawyer for Mayor Bill de Blasio, who has promised to strip $1bn from the NYPD’s $6bn budget and redirect it toward social services. She has benefited from a number of recent endorsements, including from Alexandria Ocasio-Cortez, the Bronx Congresswoman and progressive star.

“Here’s the reality — we are hiring police officers to do the work of social workers,” she said on Wednesday night in a final debate that was dominated by questions about public safety.

Jumaane Williams, New York City’s public advocate, said he felt compelled to support her campaign after concluding that voters were being given a false choice: between more policing or more violence. “Policing alone can’t — and never has — provided public safety,” Williams said.

Another progressive candidate, Dianne Morales, a former schools official, wants to take $3bn from the police department and has gone so far as to claim that police were making the city more dangerous.

In an overwhelmingly Democratic city, the winner of Tuesday’s primary will almost certainly carry November’s general election and take charge of America’s biggest city at a perilous moment, as it tries to recover from a pandemic that has killed more than 33,000 residents and frayed the commercial and social fabric.

Sankey diagram showing the estimates from a recent survey by WNBC/Telemundo 47/ POLITICO/Marist of 876 likely Democratic voters in the New York City mayoral primary. Eric Adams comes out ahead after 12 rounds of ranked-choice ballots are tallied, according to estimates calculated by FairVote, a non-profit organisation. In the city

Whoever wins, some analysts and observers have concluded that the political winds have shifted on security.

“The pendulum had swung way out to the defund movement, and I think now it’s swinging back,” said Richard Aborn, president of the Citizens Crime Commission, a non-partisan group that campaigns for better policing. “I think the defund movement only thrived for the short time it did because crime was so low.”

Alexander Reichl, a professor at CUNY Queens College, agreed that rising crime had “reshaped” the mayor’s race, saying: “It has taken the wind out of the sails of many of the progressives.”

Similar debates are playing out in other US cities also afflicted by rising crime. Yet, as Reichl observed, it was a uniquely salient issue for New Yorkers because of “the long shadow of the 1970s and the fear of the city going out of control”.

According to NYPD statistics, shooting incidents are up 64 per cent this year through to the second week of June compared with the same period a year ago, when the number was also elevated. Over a 12-month period, shootings have more than doubled compared with the previous 12 months. Murders are up 13 per cent and reported hate crimes are up 117 per cent.

Line chart of New York City shootings over a rolling 12-month period relative to same time frame during the previous year, according to the New York Police Department. In 2020, shootings accelerated dramatically; in 2021 (for which the NYPD data goes up to June 13), shootings remain well above previous years but the increase has slowed a bit in recent weeks

Not captured in the numbers is the horror provoked by reports of elderly Asian women being assaulted on sidewalks and the decay of neighbourhoods as graffiti and other lawlessness takes root.

“The situation is very bad. The city has almost given up politically on any enforcement of quality-of-life crime, whether it’s squeegee pests, illegal peddlers, drug dealers on the corner, all the emotionally disturbed individuals among the homeless population,” said William Bratton.

Bratton led the police department under mayor Rudolph Giuliani, when falling crime rates set the stage for booming property prices and New York’s rebranding as “the safest big city in America”.

Bratton returned in 2014 for the first three years of the De Blasio administration. Crime continued to fall even as he curtailed the aggressive “stop and frisk” tactics that sowed so much resentment in black and Hispanic communities during the Bloomberg era.

Bratton blamed criminal justice reforms passed by city and state politicians — including doing away with cash bail for many offences — for much of the resurgence. He also lamented how the May 2020 murder of Floyd by Minneapolis police officers, and other such incidents, “tore apart” trust with communities of colour.

“Whoever ends up elected mayor, it’s going to have to be their first priority because it’s seemingly going to get worse before it gets better,” he said.

To Williams, the public advocate, that analysis overlooks the role of the pandemic, and the economic and social dislocation it has wrought while also shutting down the courts. For those advocating only incremental reforms, he noted that the Minneapolis Police Department had undergone its own overhaul before Floyd’s murder.

“We have to reimagine public safety in its truest form because what we’ve been doing is allowing police to take all this responsibility and it does not work,” he said.

Adams’ political origin story begins with police violence: as a teenager growing up in Queens he says he and his brother were beaten in a precinct basement by two white police officers. That experience, he says, led him to a career in law enforcement so he could effect change from the inside.

He retired at the rank of captain after a 22-year career during which he co-founded the group 100 Blacks in Law Enforcement Who Care to address racism within the force and build better relations with the black community.

Adams’ campaign has shown some warts, particularly concerning his past fundraising practices and, more recently, questions about whether he is actually a resident of New Jersey. (He is not, he insists.) He also has an unusual tendency to speak in the third person.

But his reputation as a pragmatist and dealmaker has reassured the city’s business elite. He has also been well positioned for the shifting mood on crime. Hours after the Times Square shooting, he staged a press conference nearby.

“Gun violence,” he answered this week when asked what his first priority would be if elected mayor. “You’re watching it over and over again in all parts of our city.” The toll, he explained, was human but also connected to the city’s economic recovery: “No tourist is going to come to this city if a three-year-old child is shot in Times Square.”

Among other changes, Adams has proposed hiring more officers of colour and cutting back on bureaucracy to send more police into neighbourhoods. Somewhat controversially, he wants to revive special “anti-crime units”, which were disbanded last year, to tackle gun crime. He has refused to disavow “stop-and-frisk”, provided it is used appropriately, a point on which Wiley has repeatedly hammered him.

“He knows policing in and out and the advantage he has as a reformer is that he’ll understand what can be done, and will be in a very good position to reject the notion of what can’t be done,” said Aborn of the Citizens Crime Commission.

But Victoria Davis, whose brother, Delrawn Small, was shot and killed by an off-duty policeman in New York City in 2016 after a road rage incident, was not convinced. Davis accused Adams of “playing off of fear” and derided him as “the go-to [candidate] for whites who want to be progressive, but don’t know how”.

In the south Bronx, a neighbourhood that has seen the worst of New York City crime over the years, Ed Garcia Conde, a longtime resident and blogger, sensed his neighbours dividing on generational lines.

“You have the older generation that wants to ‘send the troops in’ and do something about the increase in gun violence and then you have the younger generation wanting to ‘defund’ the police,” Garcia Conde stated. “It’s gonna come down to who comes out to vote.”