A black former police captain who promised to crack down on rising crime in New York is on track to become the city’s next mayor after winning the Democratic nomination.

Eric Adams, borough president of Brooklyn who served in the New York Police Department for over two decades, won the party primary after a campaign promising to strike the right balance between public safety and ending racial injustice in policing.

"New York is going to show America how to run cities," Mr Adams said on Wednesday as the final votes were being counted. "I understand crime, and I also understand police abuse, and I know how we can turn around not only New York, but America."

Mr Adams will be the prohibitive favourite in the November general election against Curtis Sliwa, the eccentric Republican founder of the crime-fighting group Guardian Angels. Democrats outnumber Republicans 6-to-1 in New York City.

The vote came amid a countrywide reckoning on police brutality and racism, but also amid an unprecedented spike in violent crime in the city and was seen as the most important in a generation.

New York City Democratic mayoral nominee Eric Adams attends the "Hometown Heroes" ticker-tape parade

Credit: Getty

It offered a litmus test on Democratic attitudes around confronting crime, a major national issue that has become the most urgent matter in the local mayoral primary as Covid-19 comes under control.

Unlike his more progressive rivals – many of whom have supported calls to defund the police – the 60-year-old moderate has said he wants for more officers on the streets.

He has been the most vocal advocate of stepped-up policing, calling for the return of a remodelled version of the city’s controversial plainclothes anti-crime units, which were disbanded last year.

New York has struggled with rising gun violence. There were 490 shootings in the city between January and May of this year, up a staggering 77 per cent to the highest number in nearly 20 years. Last month a four-year-old girl was wounded by stray bullets in Times Square.

Half of New Yorkers recently polled by Ipsos said safety was their top priority, while a third said Mr Adams was the best candidate to tackle crime.

New York City police officers patrol Times Square as the department added officers to the neighbourhood following a shooting there over the weekend

Credit: JUSTIN LANE/EPA-EFE/Shutterstock

Brooklyn-born Mr Adams, who talked about growing up in poverty and suffering from police brutality as a teenager, led in all of New York’s five boroughs except Manhattan in the tally of first-choice votes and was the strong favourite among working-class black and Latino voters.

The role of leading America’s biggest city – often described as the second toughest job after president –  is a hugely important one.

Whoever wins, will be tasked with taking New York out of its darkest periods since 9/11, as it faces what Governor Andrew Cuomo called a battle against two epidemics – Covid-19 and crime.