Media playback is unsupported on your device Media caption Anger at the less moderate arm of the Republican party over the shutdown has affected their results

Democrats have won key elections in New York City and the state of Virginia, in the first major round of polls since President Obama's re-election in 2012.

With almost all votes counted, Bill de Blasio will succeed Mayor Michael Bloomberg to become the first Democrat leading New York City in two decades.

In Virginia, Terry McAuliffe beat Republican Ken Cuccinelli in a very close race for the governor's seat.

Republican Chris Christie was easily re-elected governor of New Jersey.

Who is Bill de Blasio? Born 1961, original name Warren Wilhelm Jr, nicknamed Bill; his parents divorced and he took his mother's surname, de Blasio

1989: Works for New York's first black mayor, David Dinkins, first on his election campaign and then as a staff member

1994: Marries Chirlane McCray, an African-American writer and political activist who had previously identified as a lesbian; the couple have two children, Chiara and Dante

2000: Runs Hillary Clinton's successful campaign for US Senate seat

2001: Elected to New York City Council, representing a liberal part of Brooklyn

2010: Voted in as New York City public advocate, second-highest elected office in the city

September 2013: Wins Democratic primary vote to become mayoral candidate

Tuesday's races are seen as an early test of both parties' strengths ahead of next year's congressional mid-term elections.

'Progressive path'

With 99% of votes counted in New York, Mr de Blasio secured 73% of the vote, convincingly defeating his Republican rival Joe Lhota, who polled 24%.

In his victory speech, Mr de Blasio said the poll showed that America's largest city had chosen "a progressive path", and he promised to make fighting income inequality his top priority.

He is the city's first Democratic mayor since 1993.

He ran Hillary Clinton's 2000 Senate campaign, and is seen as one of the most liberal politicians to run for mayor in decades.

Mr Lhota admitted defeat, saying the race had been a good fight and a fight worth having.

He ran the city's public transport authority under Mayor Bloomberg, a Republican-turned-independent, and also worked in the administration of Rudolph Giuliani.

Last year, Mr Lhota was lauded for quickly getting the vast subway system running again after a huge storm, Sandy, flooded swathes of the city.

ELECTION RESULTS

New York City Mayor

Joseph Lhota (Republican): 24% - Bill de Blasio (Democrat): 73%

New Jersey Governor

Chris Christie (Republican): 60.5% - Barbara Buono (Democrat): 38%

Virginia Governor

Ken Cuccinelli (Republican): 45.5% - Terry McAuliffe (Democrat): 48%

Close race

In Virginia, Mr McAuliffe won an extremely tight race, defeating Mr Cuccinelli.

For the Republican party this night is not only the tale of two elections, but of two possible paths. I am at the rally of the defeated candidate in Virginia, watching the victorious Republican in New Jersey on the big screen in the hotel ball room.

With results in from 99.7% of precincts, Mr McAuliffe polled 47% to his opponent's 45%.

Mr McAuliffe is a businessman and veteran Democratic party fundraiser. He has close ties to former President Bill Clinton and former Secretary of State Hillary Clinton, serving as chairman of her 2008 presidential campaign.

Mr Cuccinelli, the Virginia attorney general, has angled for the support of the hardcore conservative Tea Party movement of Republicans.

Mr McAuliffe, who has raised much more money, has sought to link Mr Cuccinelli to last month's partial shutdown of the federal government, which was brought about by Republicans in Washington DC.

Virginia, long a Republican stronghold, has seen a demographic shift in recent years. Mr Obama, a Democrat, won the state in the last two presidential elections.

Christie's triumph

In New Jersey, Mr Christie was declared the unofficial winner by the US media just minutes after the polls closed.

Media playback is unsupported on your device Media caption Chris Christie: "Thank you New Jersey for making me the luckiest guy in the world"

"Thank you, New Jersey, for making me the luckiest guy in the world," he told supporters after his victory.

Mr Christie won 60.5% of the vote, against 38% for Ms Buono, with 99% of precincts reporting.

Analysts say Mr Christie's popularity with voters in Democratic-leaning New Jersey makes him a contender for the 2016 Republican presidential nomination, because it could enable him to claim broad political appeal.

Mr Christie was already a popular figure when Superstorm Sandy devastated the state's coastline a year ago. His response to the storm attracted national attention.

While many in New Jersey support Mrs Buono's positions, she has had difficulty raising money, even from Democrats, because of her relatively low profile.

The results of Tuesday's polls could prove an early measure of the parties' support ahead of the midterm elections of 2014, which will decide the make-up of the House of Representatives, one-third of the Senate, and the governorships in more than half the states.

In Washington, Mr Obama's Democratic party controls the Senate, while the Republicans hold sway in the House of Representatives. Now in his second term, Mr Obama will vacate the presidency in 2017.