A bullet fired by an unstable man in Times Square on a Saturday in May ended up wounding a four-year-old shopping for toys with her family. It may have also changed the trajectory of New York City’s mayoral race — and altered a national discussion about crime and policing.

Within hours, Eric Adams, a retired police captain and mayoral candidate, used the scene as the backdrop for a press conference staking his claim as the law-and-order candidate. Adams rejected activists’ calls to “defund” the police and instead promised to send more officers into the streets to tame raging gun violence.

It seemed to work: In Tuesday’s Democratic primary he garnered the most votes, reinforcing how a contest that began as a debate about how to revive a city stricken by the coronavirus pandemic had been overtaken by worries about crime and public safety.

The next day, at the White House, President Joseph Biden appeared to be singing a similar tune. “Now is not the time to turn our backs on law enforcement,” Biden said, as he announced measures to clamp down on gun violence — from helping communities hire more police to targeting illegal guns. Seeking to head off a promising line of Republican attack, Biden said his administration was “taking on the bad actors doing bad things to our communities”.

Line chart of Murders per 100,000 showing US murder rate rose in 2020

Violent crime, which has been waning for a generation in America, is now back — and back on the political agenda after a nationwide surge of shootings and murders.

Homicides rose 18 per cent compared to this point in 2020 — a year when murders also rose — according to a sample of 72 cities by New Orleans crime analyst Jeff Asher, and many experts expect worse to come over the summer.

In New York City, shootings were up 53 per cent as of June 20, and more than 100 per cent over the past two years. The 1,402 shooting incidents in Chicago over the same period marked a 58 per cent increase from 2019. In Atlanta, rising violence has given fresh impetus to a push by residents of the wealthy Buckhead neighbourhood to separate from the larger city so they can form their own police department.

Republicans are grasping the issue, decrying the lawlessness in “Democratic cities” and blaming it on progressive demands to “defund” the police. The party this week accused Biden and fellow Democrats of doing “everything in their power to subvert law enforcement”.

But the violence is widespread and not limited to areas under Democratic control. A database maintained by the Gun Violence Archive tallied 26 mass shootings just since June 15 — from places like Newark, New Jersey and Washington, DC to Aurora, Colorado, Anchorage, Alaska and Albertville, Alabama.

“This same exact phenomenon is going on in every city in the country — large, medium, small-sized, Democrat, Republican, red, blue — it doesn’t matter,” said Mike Lawlor, a criminal justice professor at the University of New Haven who also served as a Democratic member of the Connecticut house of representatives. “Shootings are up everywhere.”

Most criminal justice experts believe the pandemic has played a role, either by worsening economic deprivation, shutting down courts or blockading young people in crowded neighbourhoods with few means of diversion.

William Bratton, who led the New York City and Los Angeles police departments, also faults some of the criminal justice reforms aimed at reducing prison populations, which he believes have been excessive. Among them: New York’s move to end cash bail for all but the worst offences.

The most politically charged suggestions for the rise in murders point to anti-police protests over the summer in response to the murder of George Floyd, or a pullback of police activity as a result. But the data belie such simple explanations, according to Asher.

The murder increase occurred in cities of all sizes, not just places where protests broke out, he said: “If you do the math comparing where there were the most protests or where there were the most violent protests, and rates of increase of murder, there’s just no relationship there.”

Bar chart of % change in murders from 2019 to 2020, by population group showing More murders in US cities of all sizes

While shootings and homicides have spiked, other crimes, such as burglary, have continued to decline over the past year. That has led Lawlor to a more nuanced theory.

Shootings, he notes, tend to be concentrated among individuals known to law enforcement and often result from cycles of gang retribution. Police have become adept at curbing them in recent years by identifying likely perpetrators and then enlisting trained community leaders to intervene.

Those face-to-face encounters to gather intelligence and build relationships have not been possible during the pandemic — even less so after the police killing last year of Floyd damaged relations between minority communities and law enforcement.

“If the community doesn’t trust the police — and police give up on a community — this breaks down,” Lawlor said. Meanwhile, officers have quit demoralised departments in large numbers.

For the Democratic party’s moderate establishment, rising violence presents a challenge to navigate progressive calls to “defund” — and even abolish — the police while avoiding the aggressive impulses of the 1994 crime bill signed by a Democratic president, Bill Clinton.

Biden spent much of his recent presidential campaign repenting to black voters for his past support of legislation that brought mandatory sentences, “three strikes” rules, and a racially tinged discussion of “super predators” on urban streets. Many Republicans, including Newt Gingrich, the former speaker of the House, also now express regret.

While Biden promised more police this week, he also offered funding for job training programmes. Not everybody was impressed. Kofi Ademola, an adviser to the Chicago anti-violence group Good Kids Mad City said violence was “fine” when concentrated in poorer neighbourhoods, but when it moves into affluent areas, “that’s when it becomes an emergency”.

“Looking at Biden’s plan you’ll see more dollars going into police than into so-called summer jobs or evidence-based work,” he added.

The group does not want more policing, calling instead for a city ordinance that would take 2 per cent of the police budget, about $35m, and spend it on programmes for youth employment, counselling and mediation, and violence interruption.

Christopher Hayes, a Rutgers University professor of urban studies, worried that the most effective policies to reduce violence may not be the easiest to sell to voters.

“It’s politically convenient to look at this and say: ‘Things are out of control. We need to come down on this with a hammer,’” Hayes said. “What’s not convenient is to say, ‘a lot of people involved with this are poor’.”

Assuming he becomes New York City’s next mayor — a final count is expected within weeks — Adams, who is black, may be the best test case of Democrats’ capacity to treat crime without creating toxic side effects. For months he has been promising voters he has unique expertise to target violent hotspots and remove guns from the streets while, simultaneously, reforming the department and repairing community relations.

As Adams put it in a recent interview: “I support closing Rikers (Island jail), but I also support closing the pipeline that feeds Rikers.”

Soon New Yorkers — and the nation — will see if that is possible.

Additional reporting by James Politi in Washington and Claire Bushey in Chicago