De Blasio is hovering near the threshold to avert a runoff.
With nearly all the votes in, De Blasio is just over the 40 percent he would need to avoid the runoff. And even though he's in second at 26 percent, former city Comptroller Thompson isn't quitting.
"The vote is so close, and part of the obligation is, did Bill de Blasio get to 40 percent? I mean at this point, with an incomplete count, he might have. But then again, we don't know that. There is an obligation to the voters, to the process," he said.
It may take a week before it is known whether the battle to decide who will face Republican Joe Lhota will be fought at all.
It will likely take until next Monday or Tuesday before an additional 30,000 or more votes are tabulated as absentee ballots arrive by mail and paperwork comes in from voters who had problems at the polls.
De Blasio sounded unofficially victorious as he thanked supporters gathered in Brooklyn early Wednesday. His campaign criticized what he called the divide between the rich and poor, took on the NYPD and the controversial stop and frisk program and pushed for Pre-K education for everyone paid for with increased taxes on the wealthy.
"We are a city that leads the nation, that leads the world in remembering that we are bigger, we are stronger, we are better as a city when we make sure everyone has a shot," he said on Wednesday. "We begin tonight."
Thompson also surged late in the game, surpassing City Council Speaker Christine Quinn to finish second. He made it clear Tuesday he would compete in a potential runoff.
"Three more weeks! Three more weeks!" chanted Thompson, the party's 2009 nominee who came with 5 percentage points of beating Mayor Michael Bloomberg. "This is far from over."
"Tonight is for every one of you out there who's ever been counted out," he said at a campaign celebration on Tuesday night. "For everyone who's ever been told their dreams are too big and the world doesn't have enough room for them. Tonight is for you."
De Blasio, more than any other candidate, benefited from the rapid fall of Anthony Weiner, who was leading in the polls before he was felled by his old demons.
A gossip site revealed that Weiner used the online handle Carlos Danger to continue to send X-rated messages to women even after he resigned from Congress in 2011 for the similar behavior.
His ill-fated campaign had two final embarrassments in its last minutes: one of his online paramours, Sydney Leathers, tried to crash his primary night rally and Weiner was caught making an obscene gesture at reporters as he was driven away.