By Edith Honan and Ellen Wulfhorst
NEW YORK (Reuters) - Bill de Blasio, a liberal running against the policies of departing New York City Mayor Michael Bloomberg, was tantalizingly close to clinching the Democratic nomination for mayor after storming back from fourth in the opinion polls a month ago.
De Blasio, the city's public advocate, could avoid a runoff election if he surpasses 40 percent of votes cast in Tuesday's primary. Unofficial results with some ballots yet to be counted showed him with 40.2 percent compared to 26.1 percent for former city comptroller Bill Thompson.
Some 19,000 absentee and military ballots will be counted starting on Monday, election officials said, enough to tip the vote to either side of 40 percent. A final tally could take days.
Any Democrat would be favored against the Republican candidate in a city where Democrats outnumber Republicans six to one. The winner of the general election on November 5 will replace Bloomberg, who has been mayor of the most populous city in the United States for 12 years.
In the Republican mayoral primary, Joe Lhota, a deputy to former Mayor Rudolph Giuliani and former head of the city's mass transit agency, won 52.6 percent of the vote. He defeated grocery chain billionaire businessman, John Catsimatidis, who had 40.6 percent.
At his victory party after polls closed on Tuesday night, the unabashed liberal de Blasio called his campaign "an unapologetically progressive alternative to the Bloomberg era."
"Settling for the status quo isn't just too small. It's a risk we as a city cannot afford to take," he said, flanked by his mixed-race family. "And policing policies that single out young people of color ... that isn't a New York we can allow to continue."
The 6-foot-5 inch tall de Blasio also has proposed raising taxes on the city's highest earners to pay for universal pre-kindergarten.
New York City political pundits and newspapers agreed that Dante, his 16-year-old son with an impressive Afro, provided momentum that helped catapult de Blasio into the lead.
"Way to Fro!" proclaimed Wednesday's front page of the New York Daily News.
The teen, whose father is white and mother is black, appeared in a TV advertisement criticizing Bloomberg's "stop-and-frisk" crime fighting tactic.
The advertisement aired in August and changed the course of the mayor's race. It was downloaded 100,000 times - including by 2,000 people in Texas - before it was even advertised online, The New York Times reported on Wednesday.
Former city comptroller Thompson, the only black candidate, vowed to stay in the race and face de Blasio if a runoff is necessary.
"We're going to finish what we started," he said at his primary night celebration. "This is far from over."
Thompson lost the 2009 mayoral election to Bloomberg, who has served three four-year terms and is leaving office because of term limits.
City Council Speaker Christine Quinn, who would have been the New York's first female and openly gay mayor if elected, was seen as most likely to follow Bloomberg's moderate policies. She won only 15 percent of the vote, the results showed.
CRIME AND POLITICS
New Yorkers, despite the overwhelming number of registered Democrats in the city of 8.3 million, have not elected a Democratic Party mayor in 20 years. Giuliani won plaudits for reducing New York's notoriously high crime rate and Bloomberg benefited from Giuliani's endorsement following the attacks of September 11, 2001.
Republican candidate Lhota faces an uphill battle. He signaled his general election strategy on Tuesday night, reminding voters of the Giuliani and Bloomberg years.
"I'm hearing a lot coming from the other side about a tale of two cities and how they want to tear down the progress that's happened over the last 20 years," Lhota said. "This tale is nothing more than class warfare, an attempt to divide our city."
"The last thing we want is to send our city back to the days of economic despair, fear and hopelessness," he said.
Among the Democrats, former U.S. Congressman Anthony Weiner placed last among the major candidates with 5 percent. He had led at one but saw his campaign crumble after news that he had not ended, as he promised, his penchant for texting women lewd pictures of himself.
"We had the best ideas. Sadly, I was an imperfect messenger," Weiner said in a Manhattan bar. His wife, Huma Abedin, an aide to Hillary Clinton when she was U.S. Secretary of State, was not seen beside him.
Sydney Leathers, who came forward this summer to say she and Weiner had frequent sexually charged conversations online and over the phone, spoke to reporters outside his primary party.
"I'm here celebrating his impending doom, his loss, here at his victory party," Leathers said.
The candidate's entourage found itself in a scrum with reporters as Weiner was escorted from his concession speech to his car. As Weiner drove away, he showed his middle finger in a gesture caught by television cameras.
(Additional reporting by Jonathan Allen, Francesca Trianni, Victoria Cavaliere and Hilary Russ; Editing by Barbara Goldberg and Daniel Trotta)