NEW YORK - Bill de Blasio was elected New York City's first Democratic mayor in two decades Tuesday, running on an unabashedly liberal, tax-the-rich platform that contrasted sharply with billionaire Michael Bloomberg's record during 12 years in office.
With 10 percent of precincts reporting, De Blasio, the city's public advocate, had 71 percent of the vote compared with 26 percent for Republican Joe Lhota, former chief of the metropolitan area's transit agency.
De Blasio's campaign tweeted out a simple message soon after polls closed: "Thank you, New York City."
De Blasio, 52, will take office on Jan. 1 as the 109th mayor of the nation's largest city. He had been heavily favored, holding an overwhelming lead in the polls for weeks.
Bloomberg, who first ran as a Republican and later became an independent, guided the city through the financial meltdown and the aftermath of 9/11. He is leaving office after three terms.
De Blasio ran as the anti-Bloomberg, railing against economic inequality and portraying New York as a "tale of two cities" -- one rich, the other working class -- under the pro-business, pro-development mayor, who made his fortune from the financial information company that bears his name.
De Blasio, who hails from Brooklyn, reached out to New Yorkers he contended were left behind by the often Manhattan-centric Bloomberg administration, and he called for a tax increase on the wealthy to pay for universal pre-kindergarten. He also pledged to improve economic opportunities in minority and working-class neighborhoods.
He decried alleged abuses under the police department's stop-and-frisk policy and enjoyed a surge when a federal judge ruled that police had unfairly singled out blacks and Hispanics. The candidate, a white man married to a black woman, also received a boost from a campaign ad featuring their son, a 15-year-old with a big Afro.
Despite his reputation for idealism, he has also shown a pragmatic side, having worked for both Bill and Hillary Rodham Clinton and Gov. Andrew Cuomo, and was known for closed-door wheeling-and-dealing while serving on the City Council.
He was expected to address a rollicking crowd of supporters at the YMCA in his home neighborhood of Park Slope, Brooklyn, a far cry from the glitzy Manhattan hotel ballrooms that usually host election night parties.
Lhota called de Blasio to concede about half an hour after polls closed at 9 p.m, according to a spokeswoman for the Democratic candidate.
"It was a good fight and it was a fight worth having," Lhota told a crowd of supporters in a Manhattan hotel before offering a word of caution to de Blasio.
"Despite what you might have heard, we are all one city," Lhota said. "We want our city to move forward and not backward, and I hope our mayor-elect understands that before it's too late."
Lhota, 59, spent much of the campaign slamming de Blasio's "tale of two cities" appeal as class warfare and argued that de Blasio's time in the 1980s with the left-wing Sandinistas in Nicaragua as an aid worker and activist made him a Marxist.
Lhota also credited stop-and-frisk with contributing to the city's drop in crime. He charged that a Blasio victory would return the city to its crime-filled past, a point he made with a TV ad that depicted graphic images of violence from decades ago.
Though polling shows New Yorkers largely approve of Bloomberg's policies, those same surveys revealed the city was hungry for a change.
While registered Democrats outnumber Republicans in the city 6 to 1, the last time a Democrat was elected mayor was 1989, when David Dinkins, de Blasio's former boss, was victorious.
Lhota, a onetime deputy mayor to Rudolph Giuliani, announced his mayoral bid on a surge of acclaim for his leadership of the Metropolitan Transportation Authority during last year's Superstorm Sandy. But his campaign struggled out of the gate, and he was slow to raise money.
De Blasio was an afterthought for much of the crowded Democratic primary, spending most of the year in a distant fourth, trailing City Council Speaker Christine Quinn, former Rep. Anthony Weiner and the Democrats' 2009 nominee, Bill Thompson.
But Thompson's campaign never ignited, and Quinn could not shake her role in the decision to amend the city's term limits to let Bloomberg run again in 2009. When Weiner's support imploded after another sexting scandal, many of his backers went to de Blasio.
Bloomberg also called de Blasio to offer his congratulations Tuesday night, according to the mayor-elect's campaign spokeswoman. Cuomo released a glowing statement, saluting his "true friend" on his victory.
Democrats also captured the other two citywide races: Letitia James, a Brooklyn city councilwoman, was elected public advocate, while Scott Stringer, the Manhattan Borough President, was chosen to be comptroller.
Associated Press writers Jennifer Peltz and Michael Casey contributed to this report.