During long campaign swings in Virginia's recent gubernatorial campaign, Bob McDonnell's staff would count the cars that sported both Obama and McDonnell bumper stickers. These ideologically confused motorists turned out to be an important demographic. On Election Day, according to exit polls, about one in 10 voters who supported Barack Obama in 2008 voted for McDonnell, the Republican.

Cable television debates offer a choice between extremes. Competitive statewide elections are a fight for the middle. This is the contest Republicans won on Tuesday.

Given the breadth of Obama's victory a year ago, Republicans had no choice but to seek the support of wavering Obama voters and independents. McDonnell, in particular, went after them with unflappable discipline -- speaking respectfully of Obama while seizing the momentum of economic discontent. Obama won just under half of Virginia independent voters last year. On Tuesday, McDonnell carried 66 percent.

Both McDonnell and New Jersey's governor-elect, Chris Christie, were blessed with opponents who combined weakness and viciousness in equal measure. But the ideological atmosphere for the election was determined by Obama himself. When I interviewed McDonnell in September, he saw the first signs of an anti-Democratic backlash among Virginia businesspeople who were concerned about the "card check" bill (which would allow union organization without a secret ballot). Then a broader resentment about the level of spending and new burdens imposed by cap-and-trade climate legislation. Then the summer of health-care-reform discontent.

The White House now dismisses Tuesday's losses as the reflection of "local issues" -- as though the Virginia outcome was determined by zoning disputes on the proposed site of a new 7-Eleven. When one of the primary concerns of the electorate is the direction of the economy, all politics is national.

By creating deficits unequaled as a percentage of the economy since World War II, by proposing to nearly triple the national debt in the next 10 years, by using the economic crisis as an excuse for the massive expansion of government authority over health care, Obama has become a polarizing figure. Of course, some Republicans thrive on ideological combat and would seek it even if unprovoked. But it is Obama's tax-and-spend ambitions that have united Republicans of every stripe in opposition, put fiscally conservative Democrats in an impossible bind and ceded the economic center to Republican candidates in Virginia and New Jersey.

Advocates of purity politics on both left and right see Tuesday's lessons differently. "If you abandon Democratic principles in a bid for unnecessary 'bipartisanship,' " said the Daily Kos, "you will lose votes." But what could this possibility mean in practice? Would Democrats have saved Virginia and New Jersey if they embraced a single-payer takeover of American health care? If they proposed another trillion dollars in new debt? Yes, Democratic turnout and enthusiasm were down in both states. But this is probably because Obamamania was an acute, not chronic, malady. And though Obama remains fairly popular, his liberal policies look considerably less appealing without his winning personality on the ticket.

Others make a similar argument with a different ideology: If only more conservatives were nominated, such as Doug Hoffman in New York's 23rd Congressional District, the party might be pure enough to excite the base. Liberal Republicans who eventually endorse Democrats, such as Hoffman's opponent, should probably expect a conservative primary challenge. But this strategy is self-destructive when universalized. Would Republican appeal throughout the Northeast really be expanded by more ideological nominees? Though the Republican Party will remain the conservative party nationally, it is not possible for Republicans to win everywhere with an identical conservative message.

The Republican candidates who won on Tuesday were generally conservative, but not angry. They were supported by the Republican base but spent most of their time reaching toward the middle. It was a center-right victory in a center-right country.

Politicians who have run for governor -- say, Bill Clinton -- had a good feel for the politics of the center. Obama has yet to demonstrate it. According to the White House, on election night he was "not watching returns" -- displaying a French monarch's indifference to America's shifting middle.

Now comes Obama's largest test, which will determine the ideological atmosphere for the 2010 election. If the president -- opposed by a majority of Americans, with almost no support from the other party -- imposes an ideologically divisive health reform, it will smack of radicalism, reinforce polarization and may cede the ideological center to Republicans for years to come.