New Yorkers go to the polls today to vote in primary elections in the race to become the city's next mayor.

The candidate who secures the Democratic nomination is widely expected to be the outright winner in November.

There is a big field of hopefuls in what has been a close, unpredictable and at times bitter election campaign.

The one-time frontrunner, Andrew Yang, arrived to the sound of cheering supporters as he ran into a park in the Bronx to begin campaigning.

He is a high-energy candidate; dancing, punching the air and hugging voters.

Andrew Yang no longer leads in the polls

Mr Yang is a household name in the US after he ran for the Democratic presidential nomination last year.

After he addressed a group of supporters using a megaphone, I asked him how he was feeling ahead of election day.

"It's all about getting out the vote. The more people who come out and vote, the better chance we have of turning the page for New York," he said.

Mr Yang was leading in the polls but has been overtaken by a new favourite, Eric Adams.

He is a former police officer who has promised to crack down on crime, a message that is proving popular with the voters.

The two frontrunners, Mr Adams and Mr Yang, have clashed on the debate stage over a range of issues even accusing each other of not being real New Yorkers and not actually living in the city they want to be mayor of.

Candidate Shaun Donovan

It is a source of frustration for other Democratic candidates, like Shaun Donovan.

"All we've heard over the last few days is the other candidates attacking each other and fighting over where they live. I am talking about where New Yorkers live, the more than 60,000 people we have sleeping on the streets and in shelters," Mr Donovan said.

For the first time in New York, ranked-choice voting is being used in this election.

People can choose up to five candidates and rank them in order of preference. When someone is eliminated, their votes are distributed among the remaining candidates, similar to the Irish system of single transferable vote.

It is a system that is being welcomed by candidate Maya Wiley who is hoping to be the first woman to become the mayor of New York city.

"We should see it as a positive for democracy. In the 27 places around the country where we have used ranked-choice voting, we have seen more people of colour being elected to office," she said.

Maya Wiley hoping to be first female New York mayor

The ranked-choice system has also led to an alliance between two of the leading candidates, Mr Yang and Kathryn Garcia.

They started campaigning together in the final days of the race.

"Rank me No 1 and then rank Kathryn Garcia No 2," Mr Yang said, although Ms Garcia stopped short of making a similar call.

The frontrunner Mr Adams, who is African American, accused them of trying to prevent a person of colour from becoming mayor.

"For them to come together like they are doing in the last three days, they're saying we can’t trust a person of colour to be the mayor of the city of New York when this city is overwhelmingly people of colour," Mr Adams said.

New York city was devastated by the coronavirus pandemic with 30,000 deaths and huge numbers of jobs lost.

Voters I spoke to on the streets of Manhattan, like Chris Gillis, said the new mayor will have a big task to rebuild the big apple.

"This place needs someone who is going to be out with the people and for the people. The previous leadership has not led us properly through this," he said.