Democrat Bill de Blasio cruised to victory in the race to succeed New York Mayor Michael Bloomberg, marking the first time a Democrat has been mayor in two decades.

Mr de Blasio beat Republican rival Joe Lhota after a campaign in which he railed against economic inequality in the city.

"My fellow New Yorkers: today, you spoke out loudly and clearly for a new direction in our city, united by a belief that our city should leave no New Yorker behind," Mr de Blasio told a gathering of about 2,000 supporters in Brooklyn.

"The growing inequality we see, the crisis of affordability we face, it has been decades in the making. But its slow creep upon this city cannot weaken our resolve."

Mr de Blasio won a hotly contested Democratic primary in September by focusing on the controversial "stop-and-frisk" police tactic endorsed by Mr Bloomberg and by criticising the billionaire mayor for presiding over "two New Yorks" – one rich, one poor.

He also promoted expanding access to pre-kindergarten, proposing a tax on the city's highest earners to pay for it, and said he would fight to save community hospitals from closing.

But it was Mr de Blasio's charismatic, bi-racial family that offered perhaps the biggest boost.

A campaign ad featuring Mr de Blasio's teenage son, Dante, who sports a tall Afro, argued that the police department’s stop-and-frisk policy unfairly targets young, black men and was easily the most discussed ad of the campaign, transforming Dante into a local celebrity.

"He's the first candidate for mayor in a long time that I’m actually excited about, excited about him helping to bring the city together and deal with issues of poverty," voter Russell Neufeld, 66, a lawyer, said at his polling site in Brooklyn.

Meanwhile in the Boston mayoral election, Irish American Martin Walsh ground out a narrow victory over John Connolly, beating Connolly 52% to 48%.

New Jersey's Republican governor Chris Christie was re-elected by a landslide in a traditionally Democratic state, propelling him as a favourite for the Republican presidential candidacy in 2016.

Mr Christie, a moderate conservative relative to the hardline Republicans, defeated little-known Democratic candidate Barbara Buono with more than 60% of the vote, making strong gains among women and Hispanic voters in a state where Democrats outrank Republicans by more than 700,000 voters.