Story by the Associated Press, curated by Jason Howerton

NEW YORK (AP) — Public Advocate Bill de Blasio held a clear lead Tuesday night in New York City’s mayoral Democratic primary as polls closed, according to early and incomplete voting returns. It was unclear, though, whether he would top the 40 percent threshold needed to avoid a runoff.

De Blasio’s rise in the race to succeed Mayor Michael Bloomberg was as sudden as it was unexpected.

First Look at NYC Election Results Shows De Blasio in the Lead, Weiner and Spitzer Fall Behind

NEW YORK, NY – SEPTEMBER 10: Democratic candidate for mayor and Public Advocate Bill de Blasio (C) greets the crowd while arriving at his primary night party on September 10, 2013 in the Brooklyn borough of New York City. De Blasio is leading the Democratic race, according to exit polls. Credit: Getty Images

Not even two months ago, he was an afterthought in the campaign but surged in part thanks to an ad blitz that centered on his interracial family, his headline-grabbing arrest while protesting the possible closure of a Brooklyn hospital and the defection of ex-congressman Anthony Weiner’s former supporters in the wake of another sexting scandal.

With 87 percent of precincts reporting, de Blasio has about 39.6 percent of the total vote. Former city Comptroller Bill Thompson has 26 percent, and City Council Speaker Christine Quinn has 15 percent. They were followed by current city Comptroller John Liu at 7 percent and Weiner at 5 percent.

First Look at NYC Election Results Shows De Blasio in the Lead, Weiner and Spitzer Fall Behind

NEW YORK, NY – SEPTEMBER 10: New York City mayoral hopeful Anthony Weiner meets with people on a street corner In Harlem on September 10, 2013 in New York City. Credit: Getty Images

Exit polling showed the appeal of de Blasio, the city’s elected public advocate, to be broad-based: He was ahead in all five boroughs; was ahead of Thompson, the only African-American candidate, with black voters and ahead of Quinn, the lone woman in the race, with female voters. He also led Quinn, who is openly gay, among gay voters.

The voter interviews were conducted by Edison Media Research for The Associated Press and other news organizations.

If no candidate surpasses 40 percent of the vote, the top two finishers advance to an Oct. 1 runoff.

The winner of that contest will face the Republican nominee Joe Lhota in the Nov. 5 general election. Lhota, ex-MTA chairman and former deputy mayor to Rudolph Giuliani, defeated billionaire grocery magnate John Catsimatidis for the GOP nomination.

In the closely watched race for city comptroller, exit interviews show Manhattan Borough President Stringer running ahead of ex-Gov. Eliot Spitzer, who was seeking a return to politics after resigning New York’s governor’s office in 2008 amid a prostitution scandal.

First Look at NYC Election Results Shows De Blasio in the Lead, Weiner and Spitzer Fall Behind

Former New York Gov. Eliot Spitzer, responds to questions during a news interview after a primary debate for New York City comptroller with Manhattan borough president Scott Stringer,at the WCBS-TV studios, Thursday, Aug. 22, 2013, in New York. AP Photo/Frank Franklin II, Pool). Credit: AP

The winner of the mayor’s race in November will assume the helm of the nation’s largest city at a critical juncture, as it experiences shrinking crime rates yet widening income inequality, and as the nearly completed One World Trade Center building symbolizes a new era after the terrorist attacks of 2001.

Bloomberg, the businessman Republican-turned-independent, is completing his third term. While the city’s registered Democrats outnumber Republicans 6 to 1, the GOP’s recent success in mayoral elections has been largely attributed to a crime epidemic, the aftermath of the Sept. 11 attacks or other extraordinary circumstances.

Nearly three-quarters of Democratic primary voters say the next mayor ought to move away from Bloomberg’s policies, according to the exit polls.

And De Blasio, 52, has fashioned himself as the cleanest break from the Bloomberg years, proposing a tax on the wealthy to fund universal pre-kindergarten and changes to city police practices he says discriminate against minorities.

“I’m a lefty and I’ve had enough of the righties,” said Jessica Safran, a business consultant from the Boerum Hill section of Brooklyn who voted for de Blasio. “Even if de Blasio moves to the center if he gets elected, he’ll be closer to the positions I want than the others.”

De Blasio, who worked in Bill Clinton’s White House and Hillary Rodham Clinton’s Senate campaign before being elected to the city council and then public advocate, the city’s official watchdog position.

“I liked what he said about the economic inequality in the city,” said Norma Vavolizza, 65, who lives in the Bronx and works in marketing. “I think it’s a serious issue that needs to be addressed.

All the candidates were hosting election night rallies in venues across the city. Each gathering went silent for 15 minutes when President Barack Obama addressed the nation on the situation in Syria.

Quinn, who was bidding to become the city’s first female and first openly gay mayor, was the front-runner for much of the year, boasting the biggest campaign war chest and strong establishment backing. But she has been dogged by her support to change term limits to let Bloomberg run again in 2009, a decision unpopular with liberals who make up the bulk of Democratic primary voters.

Turnout appeared light, but the city’s complaint line received several thousand voting-related calls. Many reported jams and breakdowns in the antiquated lever machines, which were hauled out of retirement to replace much-maligned electronic devices.

The mayoral campaign was waged in hundreds of candidate forums and across millions of dollars of TV ads and was largely fought on the legacy of the Bloomberg era. Substantial policy differences were scarce among the Democrats, who agreed that the school system needed an overhaul, that the city’s poor had been forgotten, and that stop-and-frisk police tactics used to stop suspicious people needed changing amid claims that police unfairly targeted blacks and Latinos.

Thompson nearly defeated the billionaire mayor four years ago. This year, he ran a quiet, centrist campaign with hopes of receiving enough support from minorities to reach the runoff.

Weiner surprisingly entered the race in May after being in political exile since resigning from Congress in 2011 upon admitting to lewd online exchanges with women who were not his wife.

His candidacy sparked curiosity and popular interest, and he immediately shot to the top of the polls. But support collapsed almost as quickly when he revealed in July that he continued the online behavior even after his resignation from federal office.

On the Republican side, the candidates largely pledged to follow Bloomberg’s lead, focusing on maintaining the city’s record low crime rates. Lhota led the race from start to finish, fending off Catsimatidis’ self-financed, unorthodox bid. Catsimatidis spent more than $4 million of his own money but was unable to stage a serious challenge.

Other Must-Read Stories