NEW YORK -- Billionaire Mayor Michael Bloomberg heads toward a third term bruised by a surprisingly close re-election battle that exposed lingering anger over his reversal on term limits and his prodigious campaign spending.
In the days leading up to the election, Bloomberg was expected to secure an easy victory, perhaps by double digits. But he won by just five percentage points -- an advantage of less than 51,000 votes.
The mayor called it a "hard-fought victory in a very difficult year," and promised that New Yorkers "ain't seen nothing yet" from him.
"I'm committed to working twice as hard in the next four years as I did in the past eight," Bloomberg said.
Facing an underdog Democratic opponent who had little money and no name recognition, Bloomberg still waged the most expensive self-financed political campaign in U.S. history.
But city Comptroller William Thompson Jr. hammered the mayor relentlessly on term limits, saying Bloomberg went back on his word when he orchestrated a change to a term-limits law that voters had upheld by referendum twice in the 1990s.
Thompson also blasted Bloomberg as an out-of-touch elitist who abandoned the middle class. But Thompson gave voters few other reasons to support him.
Some voters expressed their discontent in the voting booth, even though they did not believe Bloomberg could lose.
Pedro Fuertes said he voted for Bloomberg in 2005 but abandoned him this year. A vote for Thompson, he said, sent a message to the mayor.
"He will know how people feel," Fuertes said.
Bloomberg is only the fourth New York mayor ever to win re-election twice. But the close race and the simmering voter resentment this year have energized the political opposition in City Hall, and Democrats suggested that Bloomberg's third term could be his most difficult.
"There will be moments where I'm going to have to be very aggressive in speaking up for people who aren't being heard," said Democrat Bill de Blasio, who won the job of City Hall ombudsman Tuesday.
Before this campaign, Bloomberg was mostly known as a nonpartisan, pragmatic philanthropist who turned the city around after the 2001 World Trade Center attack.
"He may be remembered as one of the greatest mayors in New York history," the New York Times said when endorsing him in 2005.
But then the mayor reversed his long-held support for term limits and persuaded the City Council to change the law.
The richest man in New York and founder of the financial information company Bloomberg LP, Bloomberg said his economic expertise was crucial to steering the city through the recession.
He then went on to pour millions of his personal fortune -- estimated at $17.5 billion -- into his campaign. He had spent nearly $90 million by Oct. 29 and could top $100 million when all the bills are paid.
"I didn't like the idea that King Mike thinks he can buy anything he wants, including my vote," said Democrat Kevin Anterline, a 56-year-old university employee who voted for Thompson.
Thompson, who will probably end up spending one-tenth as much as Bloomberg, gave the mayor a scare by running up huge margins in black and Hispanic neighborhoods, winning by a 3-to-1 margin in some election districts.
"This campaign was about defying conventional wisdom. ... this campaign was about standing strong, standing tall and never backing down in the face of a formidable challenge," Thompson said after conceding defeat.
He beat the mayor handily in predominantly black neighborhoods such as Bedford-Stuyvesant in Brooklyn and Jamaica in Queens. He won Harlem and East Harlem easily, along with other heavily Hispanic districts in upper Manhattan and the Bronx.
By contrast, Bloomberg won easily on Staten Island, which has a much larger white population. He also fared better in Manhattan, particularly on the Upper East Side, where he lives.
Turnout was slightly lower than both campaigns had predicted -- about 1.1 million New Yorkers cast votes out of nearly 4.5 million people registered.
Bloomberg's margin of victory was far smaller than the nearly 20-point blowout he pulled off in 2005, and only slightly larger than the three-point win he managed in 2001 as a politically untested businessman.
Bloomberg was a Republican but left the party in 2007 to explore a presidential bid, which he eventually abandoned. For his third mayoral campaign, he ran again on the GOP and Independence Party lines.
While Bloomberg had a huge financial advantage and consistently high approval ratings, his campaign still faced obstacles.
The mayor, who has close ties to Wall Street and development, was running for re-election at a time when finance and real estate were falling apart and those relationships were not necessarily seen as positives.
New York City also leans heavily to the left, with Democrats outnumbering Republicans by a ratio of 5-to-1.