NEW YORK - The race to elect the next mayor of New York City, which comes to an end Tuesday, in some ways got its start on Oct. 23, 2008.
On that day, after rancorous debate, the City Council voted to overturn term limits, allowing Mayor Michael Bloomberg to get another four years to shape the nation's largest city.
But the aftershocks from that decision shaped much of what has followed in the topsy-turvy campaign to select Bloomberg's successor, a marathon marked by heated debates about hot-button issues, larger-than-life characters and stunning political implosions. And, as voters get set to go to the polls, Public Advocate Bill de Blasio has emerged from the chaotic field poised to be the first Democrat chosen to lead the city since 1989.
In this Oct. 25, 2013 file photo, New York City Mayoral candidate Bill de Blasio greets people as he arrives for a speech by President Barack Obama at Pathways in Technology Early College High School in the Brooklyn borough of New York.
Every poll taken since the September primary has de Blasio with a commanding lead over Republican nominee Joe Lhota, a one-time deputy mayor to Rudolph Giuliani. An unabashed liberal, de Blasio said he will usher in a new era of progressive governing by raising taxes on the rich, improving police and community relations and reaching out to those who feel slighted by what they believe were 12 years of Bloomberg's Manhattan-centric policies.
More than any of his rivals for the Democratic nomination, de Blasio positioned himself as the cleanest break from the Bloomberg years, an argument that resonated with many suffering from what has become known as Bloomberg fatigue.
"An awful lot of what has happened can be traced to that decision to give Bloomberg another four years," said Jeanne Zaino, a New York University political science professor. "The third term is widely viewed as not as successful, but no matter how wonderful a mayor you are, people get tired of seeing you in their living room every night."
Beyond bolstering de Blasio, the term-limit extension crippled three seemingly strong Democratic candidates.
Bill Thompson, a former comptroller, was the party's 2009 nominee and while he nearly upset Bloomberg then, his lackluster campaign raised questions about his ambition and convictions that continued to dog him in 2013.
City Council Speaker Christine Quinn entered this year as the favorite, but as Bloomberg grew more unpopular among Democrats, she couldn't shake her links to him or her role in overturning term limits.
And then-congressman Anthony Weiner decided to table his 2009 mayoral ambitions until 2013. Instead, he resigned from Congress in 2011 amid a sexting scandal, an issue that resurfaced this past summer and devastated his comeback candidacy.
Weiner's implosion most directly benefited de Blasio, who had been stuck in a distant fourth in the polls. But the Brooklyn Democrat also made several shrewd political calculations to surge at precisely the right moment.
De Blasio had the clearest message of any candidate, repeatedly describing the city's income inequality as "a tale of two cities" while proposing a tax hike on the wealthy to fund universal prekindergarten. He also was the loudest voice calling to reform the New York Police Department's stop-and-frisk practice just as a judge in August ruled that it discriminated against minorities.
The supporters of stop and frisk, which allows police to stop anyone acting suspiciously, say it has driven down crime. An appeals court blocked the judge's ruling this past week but long after de Blasio gained momentum from the original decision.
"De Blasio ran a classic challenger campaign, positioning himself as an outsider even when he has spent years in government," Zaino said. "He had a vision, and he communicated it clearly. Unlike the others, there was no question what he stood for."
De Blasio, who worked in President Bill Clinton's administration and ran Hillary Rodham Clinton's Senate campaign before being elected to the City Council and then public advocate, also showcased his interracial family throughout the campaign. One TV commercial starring his Afro-sporting 15-year-old son, Dante, is already regarded as an iconic political ad.
That momentum propelled him over the 40 percent mark needed to avoid a runoff, an unthinkable occurrence for much of the year.
Lhota was head of the Metropolitan Transportation Authority when Superstorm Sandy struck last year and received widespread acclaim for getting the subways, trains and tunnels back quickly. He became the darling of the Republican Party, though Lhota had never before run for office.
After a tougher-than-expected primary challenge from billionaire grocery store magnate John Catsimatidis, he spent weeks needling de Blasio about the Democrat's time in Nicaragua in the 1980s with the left-wing Sandinistas, a topic that most voters met with a shrug.
In the campaign's stretch run, he began to effectively showcase his bipartisan credentials - he worked for Giuliani, a Republican, and Gov. Andrew Cuomo, a Democrat - and boasted that, unlike de Blasio, he has run large organizations. He also unleashed harsh rhetoric and a hard-hitting TV ad suggesting that the city could return to its crime-filled ways if de Blasio won.
He made some inroads in the polls but still trails by nearly 40 points with just days to go.
"It seems like the city wants a Democrat right now," said Christina Greer, political science professor at Fordham University. "Five terms of heavy-handed government has tired people out. People are ready for something different."