× Expand AP Images/Steve Helber

Ken Cuccinelli wasn't even supposed to be running. Among Virginia Republicans, everyone knew the order of succession-after Governor Bob McDonnell wrapped up his term in office, Lieutenant Governor Bill Bolling was supposed to be next up. That was the bargain the two men struck in 2009 to avoid a messy primary battle. But no one had consulted Cuccinelli, the attorney general and the state's social conservative darling, and he wasn't content to wait his turn. In December 2011, Cuccinelli, the man who made his name fighting against abortion and gay rights, announced his candidacy.

It looked like a smart move. Cuccinelli had national ambitions; already, some saw him as a contender for the 2016 presidential nomination, following in the footsteps of Rick Santorum and other far-right figures. But first he needed a higher-visibility role-and he needed to prove that he could make his message attractive to a wider audience. His vehement opposition to abortion and gay rights, as well as his ardent denial of climate change may have given Cuccinelli plenty of support in the Republican base, but overall, he was a mediocre candidate. He was awkward at speaking engagements and loath to talk much about his faith and family in detail. Furthermore, the qualities that made Cuccinelli so attractive as a far-right presidential candidate were a liability in Virginia. If Cuccinelli had a shot, he needed a weak opponent, and the Democrats' presumed nominee seemed to fit the bill.

Terry McAuliffe, the lone Democrat who stepped up to the plate, had spent most of his life in and out of the business world. He was famous for asking for big checks from donors during his stint as chair of the Democratic National Committee in the early 2000s. His only other campaign was the 2009 Virginia gubernatorial race, when he limped home from the Democratic primary with only 26 percent of the vote and a bad rap for being a shady operator-his style smacked more of Syracuse, his hometown, than the Old Dominion's genteel ways.

But on Tuesday, voters will head to the polls and very likely elect McAuliffe as Virginia's next governor. Contrary to all of the best political soothsaying, Cuccinelli is flailing in the polls, hoping for an unlikely comeback after a disastrous campaign. Between scandals and Republican infighting in a state with a rapidly-changing identity, Virginia's governor's race has been anything but predictable. More than anything else, this campaign has highlighted how, when it comes to state-level races, conventional wisdom doesn't get you very far.

For Virginia Democrats, Obama's victory in 2012 meant an uphill battle to retake the governor's mansion. Virginia holds its state elections in odd-numbered years, and the governor's race always comes just one year after the presidential election, when voters are most likely to feel buyer's remorse. Pundits are fond of noting that for the past 36 years, the party that wins the presidency has gone on to lose the governor's race.

But this year, Republicans had to contend with the sweeping demographic shifts that enabled Obama to carry the state in both 2008 and 2012. In other states, demographic change usually refers to the rising numbers of Latino voters, but Virginia's is mostly due to the explosive growth of the Washington D.C.'s northern Virginia suburbs. In 1970, the region accounted for about 12 percent of the state population; one-third of the state now lives there. The influx of well-educated, high-earning government employees and contractors is transforming Virginia, once predominantly rural, religious, and working-class, into a battleground state, full of young, secular, white-collar voters. The result is peculiar: It's as if an imaginative cartographer excised a handful of New Jersey suburbs and glued them onto Georgia.

Your donation keeps this site free and open for all to read. Give what you can... SUPPORT THE PROSPECT

These new voters favor Democrats-but only if they vote. In 2009, Republican Bob McDonnell was elected in a landslide, thanks to low turnout among young people and minorities. This year, McAuliffe was eager to harness the Obama campaign's extensive infrastructure to coax more of his base to the polls. Meanwhile, Republicans were divided over the best approach: Should they back a moderate candidate-like Bill Bolling-who might be able to compete with McAuliffe in northern Virginia? Or should they nominate a social conservative-like Cuccinelli-who could help energize their base?

In addition to representing two competing futures for their party, Bolling and Cuccinelli hate each other. A primary struggle would have brought a long-simmering rift between moderate and extreme Republicans, as well as a personal rivalry, to a full boil on a public stage. Cuccinelli was more popular among the Republican base-primary polls from the spring of 2012 showed him ahead of Bolling by 20 points-but his win wasn't in the bag just yet. Bolling was the underdog, but had backing from establishment Republicans and a financial advantage; in the first six months of 2012, he out-raised his competitor nearly two-to-one. He was also serving as Mitt Romney's state chairman for Virginia, a role that-if all went well-could yield an endorsement from a sitting president. Before Cuccinelli announced his candidacy, the state Republican party had decided that the candidate would be nominated in a primary held in June 2013. Both sides geared up for a bitter, expensive battle.

But then Cuccinelli scored a decisive victory. In the lead-up to the Republican Party convention in June 2012, his Tea Party supporters quietly took control of the state GOP leadership. Over protests from Bolling and McDonnell, the newly elected party officials voted to nominate the 2013 ticket at the GOP convention the following June, where the extreme wing of the party was more likely to be in attendance. Cuccinelli was all but assured victory.

Late in November of 2012, Bolling announced he would abandon his quest for the GOP nomination, and gave a Cassandra-like warning to his fellow Republicans. "The party has to decide whether we're more interested in engaging in great ideological debates, or winning elections and earning the right to lead," he told the Richmond Times-Dispatch. "At a time when we need to be involving more people with more diverse views in our party, our party's leaders selected a method of nomination that is by its very nature exclusive."

Terry McAuliffe declared his candidacy for governor the day after Obama won Virginia for the second time, but after his erratic performance in the 2009 primary, he seemed ripe for a challenge. McAuliffe had been the glad-handing operator who helped get other people elected; in his autobiography, he recounted abandoning his wife in the hospital while she was in labor to run to a fundraiser-not the kind of anecdote politicians are supposed to share.

Pundits held their breath, but no rival emerged. Mark Warner, the popular former governor and current senator, quickly quashed speculation by announcing that he was staying out of the race. Rumors circulated briefly that Tom Perriello, a one-term Virginia congressman and president of the Center for American Progress Action Fund, might step up to the plate, but he, too, denied them. Brian Moran, the former chair of the Virginia Democratic Party and McAuliffe's major rival in 2009, told the Prospect he didn't even consider running. Part of the calculus may have been financial-any primary challenger was sure to be outspent by McAuliffe-but Moran says that at least among the Democratic establishment, there was a consensus that McAuliffe was the best man for the job. Many pundits, however, were skeptical about whether he could run a serious campaign and get away from his image as a schmoozy insider.

Your donation keeps this site free and open for all to read. Give what you can... SUPPORT THE PROSPECT

With two flawed candidates, the race was always going to be negative, as each sought to define the other. McAuliffe and Cuccinelli were tied in the polls in January 2013, but few voters knew enough about McAuliffe to form an opinion, giving Cuccinelli ample opportunity to shape it for them. Cuccinelli planned to hammer McAuliffe as a sleazy carpetbagger with few real ties to the state and little governing experience. McAuliffe, meanwhile, prepared to dangle Cuccinelli's record as attorney general before the voters, painting his rival as a wingnut with intolerant positions on social issues. He needed to show the voters who rarely turned out in off year elections that electing Cuccinelli would turn Virginia into a far-right dystopia.

For the first few months of the year, the campaigns seemed evenly matched. McAuliffe outraised Cuccinelli by a large margin, but the attorney general had greater name recognition. By March, Bolling had announced he wouldn't run as an independent, which would have split Republicans and handed McAuliffe a win. The two campaigns ran pretty much even in the polls for the first few months of 2013. In April, Cuccinelli began to pull ahead.

Then things began to fall apart. At the end of March, The Washington Post ran a lengthy piece uncovering Governor McDonnell's deeply problematic relationship with Jonnie Williams, the CEO of Star Scientific, a nutritional supplements company. Williams had given the McDonnell family numerous expensive gifts, including paying for part of their daughter's wedding. The article also mentioned that Williams had let Cuccinelli use his boat and stay at his home.

The Star Scientific scandal dominated the news for months, and hamstrung the Cuccinelli campaign. While the attorney general was not involved in the worst parts, he was a little too close for comfort. Cuccinelli had failed to disclose his more than $10,000 in Star Scientific stock. He had accepted $18,000 in gifts from Williams, and he had failed to disclose $5,000 of them. McDonnell was embattled in ethics probes, and the once-popular governor was no longer a suitable surrogate. Meanwhile, Cuccinelli lost his best argument against McAuliffe; he now looked like as much of a shady operator as his opponent.

When the state GOP convention finally rolled around in mid-May, Cuccinelli wasn't the only hard-liner to get nominated. Far-right attendees chose a virtual unknown, minister E.W. Jackson, to be their candidate for lieutenant governor. Within hours, journalists had revealed Jackson's long history of incendiary comments, including that gay pride month made him feel "ikky" [sic] and that Planned Parenthood was "far more lethal to black lives than the KKK ever was." Mark Obenshain, the Republicans' nominee for attorney general, had worked with Cuccinelli to sponsor a "personhood" bill that would have given fetuses the same legal rights as citizens. With such a far-right ticket, Cuccinelli couldn't easily try to position himself close to the center. A Supreme Court ruling on gay marriage didn't help things. Amidst the coverage, Cuccinelli was stuck defending his 2010 decision to tell public universities they could not prohibit discrimination based on sexual orientation among students, staff, or faculty unless the General Assembly gave approval.

Cuccinelli's seemed to misread Virginia's changing character. He hammered McAuliffe for being non-native to the state, but less than half of Virginia's population was born there. He eventually focused on a riling up his base, but in Southwestern Virginia, where his support was likely to be highest, Cuccinelli was embroiled in a scandal after one of his assistant attorney generals helped advise two out-of-state companies in a case against landowners in the region. Cuccinelli needed to fight for votes, even where his support should have been strong.

The rift between moderate and extreme Republicans had never seemed wider. Cuccinelli had spent the legislative session trying to kill McDonnell's prize piece of legislation-a bipartisan transportation bill. Many Virginia Republicans were still angry at Cuccinelli for working to find primary challengers for incumbent senators, and refused to champion him when the campaign started going south. "Cuccinelli burned a lot of bridges among other Republicans," says John McGlennon, a political science professor at the College of William and Mary. "Nobody will defend him because he screwed everyone over." Moderate Republicans jumped ship. Boyd Marcus, one of the best-known GOP strategists in the state, endorsed McAuliffe, as did the Republican mayor of Virginia Beach. Bolling never officially threw his weight behind McAuliffe, but he did endorse many of his positions, including expanding Medicaid under Obamacare. A long-shot libertarian candidate, Robert Sarvis, began climbing in the polls, a sign that many Republican voters weren't satisfied with Cuccinelli.

Meanwhile, as the summer progressed, McAuliffe's outlook got sunnier and sunnier. He had more than double Cuccinelli's money and used it to hammer his opponent on the ethics scandal and the attorney general's extreme positions on social issues. McAuliffe began visiting just about every university or community college in the state to fire up younger voters. Despite plenty of effort from the Cuccinelli campaign, no one seemed to care much about GreenTech, the company McAuliffe had once run, which had failed to build a plant in Virginia and now is embroiled in a scandal over offering visas to foreign investors. By August, the Democrat was consistently leading the polls.

Perhaps most significant was the shift in the two parties. According to Jennifer Duffy, a senior editor for The Cook Political Report, as McAuliffe proved himself to be a stronger candidate than in 2009, his party began to coalesce around him.

"Democrats waited to see if he had changed, and once they had that confirmation and things got comfortable, things started to fall into place," she says.

His former opponent, Brian Moran, agrees. "Terry had been doing everything he needed to do since the day he lost in 2009," Moran says. "He established relationships and got more polished and substantive and policy-oriented."

By September, two leading prognostication sites, the Rothenberg Report and Larry Sabato's Crystal Ball, both showed the race favoring McAuliffe. Women preferred him by a 24-point margin, according to one Washington Post poll in September. When, in October, the Congressional Republicans shut down the government, Cuccinelli dove even further in the polls.

After Tuesday's election, Virginia's Republicans will face a quandary. Regardless of the outcome, the party will continue to be controlled by a Tea Party faction. Moderates like Bolling who did not endorse Cuccinelli will have to determine whether there's still room for them in the Grand Old Party. If Cuccinelli loses, as many expect he will, it should be a wake-up call that extremism doesn't represent the new face of Virginia voters. But nationally, as the Tea Party increasingly becomes representative of the GOP, Republicans have been slow to embrace such a message, despite the results of the 2012 election.

Of course, Cuccinelli could still win. The election has had so many strange twists, that the final outcome is still hard to gauge. Despite McAuliffe's efforts towards a robust get-out-the-vote effort, the election will still turn on a relatively small number of voters. The campaigns have been extremely negative on both sides, a necessary evil for the two largely unknown candidates, but such ads often drive down turnout.

With a state changing as rapidly as Virginia, if Democrats can continue their unified front, they'll likely make headway in future elections. Republicans, on the other hand, will have to decide how much room their party has for newcomers-and whether they will accept those who don't conform to one definition of conservative.