With 62 percent of precincts reporting, Thompson had about 69 percent of the vote. City Councilman Tony Avella of Queens had 22 percent.
The Democratic mayoral contest was a lonely race this year after Bloomberg announced he would run again.
Bloomberg had been barred from a third term but convinced the City Council last year to change the term-limits law.
Thompson says now the real work begins.
He has raised about $6 million, while Bloomberg has already spent more than $40 million of his own money.
Bloomberg is not registered with a party and did not compete in a primary Tuesday.