By Jonathan Beale
BBC News, Washington
President Obama lent his support to Democrat Jon Corzine in New Jersey
Tuesday, 4 November 2008, will be remembered as the day when Barack Obama made history.
But Tuesday, 3 November 2009, is a day that many Democrats will probably want to forget.
One year after the election of the nation's first African-American president, voters in Virginia and New Jersey turned their back on the Democratic Party.
It is inevitable that these results will reflect badly on the president. That is certainly what the Republicans wanted.
But in reality these elections were not a simple referendum on Mr Obama.
Exit polls in both Virginia and New Jersey showed that a small majority still approved of the way he is running the country.
It is the economy that seems to have been the overriding concern. That along with a whole host of more parochial and even personality issues.
It is worth remembering that these were essentially local elections.
Virginia was the first state to turn from blue to red.
But at a Democratic "victory" party in Arlington the activists I spoke to blamed the defeat on their candidate, Creigh Deeds, not Mr Obama.
A number told me he had simply failed to get his message across. His stumbling performances had made his Republican rival, Bob McDonnell, appear slick.
Virginians also have a habit of changing their mind after each presidential election. After voting for Obama last year, it was the turn of the Democrats to get a kick in the teeth.
New Jersey followed the same way as Virginia, with Republican Chris Christie ousting the sitting Democratic Governor, Jon Corzine.
At first this gubernatorial contest might have also looked like a referendum on Barack Obama.
Jon Corzine had been hanging on the coat tails of the president's personal popularity in this strongly Democratic state.
Mr Obama had lent his support on the campaign trail and in TV ads.
But once again the economy and concerns about jobs seem to have been the deciding factors. Jon Corzine had raised taxes, Chris Christie promised to cut them.
Exit polls showed that voters who expressed the highest levels of economic discontent heavily favoured the Republican candidate.
So all in all it looked like a good night for Republicans.
But there was a sting in the tail. It happened in the 23rd congressional district in upstate New York, a seat that has been in Republican hands for more than a century.
Last night it voted democrat thanks largely to a bitter row within Republican ranks.
Dede Scozzafava was the Republican candidate.
Crazy name, and for a Republican some pretty crazy policies - pro-abortion and pro-gay marriage, positions more likely to incense rather than excite the party base.
So some of the party's biggest names like Sarah Palin and Fred Thompson ended up supporting the "Conservative Party" candidate, Doug Hoffman.
Dede pulled out of the race and backed the Democratic candidate - Bill Owens. And Mr Owens ended up winning.
More than that, the Democratic Party and President Obama now have a powerful weapon with which to attack the Republican party.
They will say this is the proof that the Republican Party is being taken over by the right - that it is no longer a place for moderates or independent minded voters.
It was hardly a good night for President Obama. But it could have been much worse.