NEW YORK - Billionaire Mayor Michael Bloomberg won a third term Tuesday, defeating Democratic challenger William Thompson Jr.

With 99 percent of the precincts reporting, Bloomberg beat Thompson 51 percent to 46 percent. Bloomberg was able to seek a third term by changing the city's term-limits. Polls prior to the election had showed Bloomberg ahead by as much as 18 points.

Thompson ran up huge margins in black and Hispanic neighborhoods, winning by a 3-to-1 margin in some districts. He beat Bloomberg handily in predominantly black neighborhoods like 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.

Bloomberg is just the fourth mayor to win a third term, after Fiorello La Guardia, Robert Wagner and Ed Koch.

AP reports contributed to this story