It has been described by previous holders of the post as the second hardest job in America – certainly the most glamorous civic one – and for the past 12 years has been filled by the polished, autocratic, paternalistic boots of the financial data billionaire Mike Bloomberg.
On 10 September, New Yorkers will begin the process of electing a successor with the main party primaries. The mayoral election itself is on 5 November.
It is a contest that, on the Democratic side, has become an extraordinary battle involving disputes over sex, race, gender and family values, as well as an evaluation of Bloomberg's New York, which many feel has become more economically and racially polarised during his era.
The tone of the political season was defined, less than two months ago, by a sexual scandal involving Anthony Weiner, the former city congressman, who is one of the Democratic candidates. Frontrunners in the party's race are the Italian-American Democrat Bill de Blasio, the city's elected public advocate, and Christine Quinn, the New York city council speaker and Bloomberg's designated successor.
De Blasio is a progressive candidate with a wife of African descent; he champions the outer boroughs and depicts the Bloomberg era as unfeeling and undemocratic. Polls suggest he may pull far enough ahead to prevent a run-off between the top two Democratic candidates on 1 October. But that's only if Quinn, the candidate endorsed by the New York Times and much of the liberal political establishment, fails to counter depictions of her as a tough, Manhattan-focused, Bloomberg-lite who shows little feeling for the issues affecting middle-class families.
With de Blasio having 32% support among likely voters and Quinn battling Bill Thompson, the African-American candidate who came close to beating Bloomberg in 2009, in the high teens, the New York mayoral race is in the midst of an unexpected turnaround.
But the prospects of the candidates – seven on the Democratic side, four on the Republican ticket – are closely tied to the shifting sensibilities of a large number of uncommitted voters who are more likely to identify candidates they would not support than ones they would.
"There are not enough issues being talked about and the candidates are not staying on track with the issues that are being talked about," says Pamela Garcia, a community activist in the Flatbush area of Brooklyn.
Garcia had come to a forum to press the candidates on education, widely considered to be an area of weakness in Bloomberg's record. She felt the candidates and voters were too easily distracted by issues related to their personal lives.
"Whenever you have a candidate whose personal life is somewhat different to the norm, or you have one who has admitted to adultery, or another who speaks highly of his wife who had a relationship with another woman in the past, it makes you pause," Garcia says. "But you still have to be clear-sighted over the real issues."
Garcia is referring to Quinn (who is married to Kim Catullo, a woman), to Weiner (whose "sexting" recidivism destroyed his candidacy) and to De Blasio, who has presented his wife Chirlane, a former lesbian, and Afro-haired 15-year-old son Dante as proof of his modern, middle-class, multicultural credentials.
De Blasio has benefited from a proposal to tax the wealthiest New Yorkers for universal pre-kindergarten education, and from a recent legal ruling which concluded that senior city officials had turned a blind eye to evidence that the city's police department's stop-and-frisk policy was conducted in a "racially discriminatory manner". In a TV ad, Dante de Blasio takes direct aim at Bloomberg, promising his father will be the "only one who will end an era of stop-and-frisk that unfairly targets people of colour".
With her ties to Bloomberg and his unpopular policing policies, that is a position Quinn, who depends on a large turnout of women and gay voters to win, cannot reasonably hope to emulate, and her campaign's attacks on De Blasio have largely missed the mark. Quinn recently took issue with Chirlane de Blasio over a comment she interpreted as suggesting that, as a childless woman, Quinn could not identify with family issues.
The candidate said she took "great personal offence to the comment, as does my wife". But that backfired after the De Blasio campaign was able to show that Chirlane had been misquoted by Maureen Dowd, the queen of New York Times columnists.
Still the dispute hinted at an issue, primarily among women, over gender and equality that is likely to be resurrected if Hillary Clinton runs for president in 2016. The Hollywood star Susan Sarandon had expected to support Quinn to become the city's first female mayor. But after Quinn backed Bloomberg in 2008 in a move to extend term limits, allowing him to serve a third term, and failed to support paid sick-leave legislation, Sarandon switched her endorsement to De Blasio. "It became clear to me that as a woman, you can't just vote your vagina," she said. .
But in New York's tribal political environment, sex can hardly be disqualified as an issue and by invoking the "vagina vote", Sarandon appeared to counter feminist writer Gloria Steinem who had earlier released a campaign video supporting Quinn.
"Imagine how much it will mean to girls and young women, and young men, too, to see that it's possible to have a woman in what is always said to be the second most important job in this nation," Steinem offered.
Recast as a postmodern family values and sexual equality contest, the mayoral race is as much about looking beyond the traditional white male mindset of Bloomberg and Weiner as an illustration that the white vote in New York is on the verge of becoming a minority vote.
With time running out and De Blasio the candidate to beat, his rivals are expected to recalibrate their attack for the final televised debate on Tuesday.
But attacks will not settle the question of whether the city is heading in the right or wrong direction after 12 years of Bloomberg rule. It is clear that while Manhattan has been transformed by development – the Bloomberg campaign draws attention to 400 miles of bike paths and three-quarters of a million new trees – the outer boroughs have not seen similar improvements.
With his slogan of "a tale of two cities" hinting at economic disparity between Manhattan and his strongholds of Queens, Brooklyn and the Bronx, De Blasio is offering a clean break from Bloomberg. In a city where white residents are becoming a voting minority, and barring any last-minute upset, that appears to be a winning position.
Still, voters like Garcia worry that De Blasio's promises will prove as empty as those made by others before him. In July he was arrested for civil disobedience during a protest over plans to close a Brooklyn hospital and sell the buildings.
"We know hospitals are closing every year," says Garcia, "and it's not a big deal to join a protest.
"What would be a big deal would be to describe a way to find the funds to keep the hospital open after you've been elected to office."