Bill de Blasio was accused by Democratic rival Christine Quinn of 'talking out of both sides of his mouth'. Photograph: Spencer Platt/Getty Images

As the Democratic candidates for New York mayor enter the last 24 hours of frantic campaigning ahead of Tuesday's primary vote, all energies are focused on driving up the turnout in a race rendered unpredictable by the large proportion of voters still sitting on the fence.

An eve-of-election opinion survey by Quinnipiac University's polling institute puts the number of undecideds among likely Democratic voters as high as 8%. That slice could swing the election either way: it could deliver an all-out victory to frontrunner Bill de Blasio by pushing him over the 40% needed to avoid a runoff, or force him into a potentially bruising second round battle with one of his main rivals, former city comptroller Bill Thompson or speaker of the city council Christine Quinn.

De Blasio's lead has been eaten into by a week-long onslaught on his record and reputation by his opponents, with his rating in the Quinnipiac poll sliding from 43% last week to 39% today. But he continues to enjoy a substantial advantage over Thompson, who has gained five points to 25% in the past week, and Quinn, who is flatlining on 18%.

"We don't know where the hell those 8% of undecideds are going to go," said the director of Quinnipiac's polling institute, Maurice Carroll. "This is a real nail-biter – you could flip a coin at this stage whether or not there's going to be a runoff."

De Blasio, the current public advocate or ombudsman for New York City, continued to be pummeled by his opponents on Monday who portray him as a flip-flopper and political cynic who promises policies he knows he cannot deliver.

Quinn took the fight to three schools at the start of the city's public school year, and made an intensive round of media interviews.

"What we've seen in this race is a tale of two De Blasios. He's talking out of both sides of his mouth," Quinn told the AM 1600 WWRL radio station on Monday morning at the start of her punishing day of campaign stops.

Quinn's comment was a quipp on De Blasio's campaign slogan – a Tale of Two Cities – which is in turn an implicit criticism of Michael Bloomberg's three terms as mayor. De Blasio has run a relentlessly anti-Bloomberg campaign in which he has blamed the incumbent for having turned New York into a playground of the rich and powerful while the poor in the outer boroughs have been overlooked.

Bloomberg hasn't taken it lying down, however. Over the weekend he launched his own lightning strike on De Blasio, telling New York magazine that in his view the Public Advocate had been running a campaign that was "class warfare and racist".

Asked to explain himself, Bloomberg referred to the fact that De Blasio has appeared on the stump and in TV ads with his black wife and bi-racial children. "I think it's pretty obvious to anyone watching what he's been doing … It's comparable to me pointing out I'm Jewish in attracting the Jewish vote," Bloomberg said, regardless of the fact that he himself wore a yarmulke in campaign rallies while running for mayor in 2005.

For good measure, Bloomberg added the thought: "Wouldn't it be great if we could get all the Russian billionaires to move here?" and said "the people that would get very badly hurt here if you drive out the very wealthy are the people [De Blasio] professes to help. Tearing people apart with this 'two cities' thing doesn't make any sense to me."

If Bloomberg was hoping that his remarks would help to slow the onward march of the De Blasio bandwagon, his attempt appears to have backfired. De Blasio siezed on the comments with relish, alluding to them frequently on the campaign trail and calling them "unfortunate" and "inappropriate".

Bloomberg's intervention may have no impact on the outcome of Tuesday's poll, as the mayor in the twilight of his 12 years in the job is seen as increasingly irrelevant. But as Carroll puts it: "When things are this close, any tiny thing can make a difference."

It was a sign of his growing confidence, perhaps, that De Blasio spent the last day before polls opened campaigning in Manhattan where is "two cities" mantra is most controversial. Following a school visit in Brooklyn he had stops scheduled in the Upper West Side, Washington Heights and East Harlem.

His poll figures show a remarkable consistency between key demographic groups, suggesting that at least among Democrats his overtly liberal stance is proving remarkably popular across the board. That includes both women who back him with 40% and men (38%); black likely Democratic voters (37%) as well as whites (40%).

Thompson is hoping to hold De Blasio below the 40% marker and secure his place in a two-candidate second round on 1 October by embarking on one of his trademark 24-hour campaigning stints. It began at 7am at the gates of a public school in Brooklyn, and will end at 7am tomorrow when he votes in Harlem, taking in a trip to a bakery at 3.30am and the Staten Island ferry terminal at 5am.