This article is from the archive of our partner National Journal

For more than a decade, Mark Warner has been Virginia's Teflon Democrat.

Even as the fortunes of both parties in the state have swung wildly from election to election and President Obama's popularity has ebbed and flowed, Warner remained stubbornly popular, typically scoring the highest approval ratings of any statewide politician. As governor and then senator, he worked assiduously to portray himself as an independent-minded centrist, an above-the-fray statesman who wouldn't get dragged down by the partisan fight of the moment.

All of that almost ended Tuesday. Warner's party label finally caught up to him, and Ed Gillespie came tantalizingly close to taking his seat. As of Wednesday morning, Warner led by fewer than 17,000 votes—or 0.76 percent—a margin narrow enough that Gillespie would be entitled to ask for a recount if he chooses.

When Gillespie—previously a lobbyist, Republican National Committee chairman, and Bush White House aide—entered the race at the start of 2014, few observers gave him much of a chance to win. He was positioned to be the GOP's sacrificial lamb, and even as the race tightened in the closing weeks, many Republicans still figured Gillespie had a better shot at the governorship in 2017 than the Senate in 2014.

But Gillespie sensed from the start that this year's climate would favor Republicans, and he pounded Warner incessantly as an alleged Obama clone who voted with the president nearly all the time. Recognizing that Warner's stint in the Governor's Mansion was still fondly remembered by most Virginians, Gillespie and his fellow Republicans claimed repeatedly that "Governor Warner wouldn't recognize Senator Warner today."

Gillespie wasn't the only Republican who sensed that Warner was vulnerable. Chris LaCivita, the veteran Virginia-based GOP campaign strategist, has long argued that Warner had gotten off too easily, had never faced a real challenge from a tough opponent, and hadn't faced real scrutiny of his Senate record. "Mark Warner is the luckiest politician in the commonwealth of Virginia," LaCivita said in early 2013, adding that "the perception of Mark Warner the untouchable or Mark Warner the moderate ... is completely and utterly baseless."

To the end, Warner portrayed himself as a seeker of consensus, willing to work with—or buck—either party. But while Warner has indeed worked on some high-profile bipartisan ventures , such as the famous "Gang of Six" effort to strike a sweeping deal on spending, he did not have many concrete achievements to tout.

And Warner's brand was further tarnished when it was revealed that he had discussed with state Sen. Phillip Puckett some possible job opportunities for Puckett's daughter, just as Democrats were trying to prevent Puckett from leaving the state Senate and throwing control of the chamber to Republicans. The episode allowed Republicans to question Warner's ethics—a potent charge, given that Virginia is still recovering from the massive scandal surrounding convicted former Gov. Robert McDonnell.

Poor turnout among dejected Democrats obviously hurt Warner, as it did his party's candidates across the country. Warner's campaign also was largely on its own when it came to the ground game. In Virginia's only supposedly competitive House race, Barbara Comstock trounced Democrat John Foust by 16 points, and the three Democrats who won—Reps. Gerry Connolly and Bobby Scott, plus incoming Rep. Don Beyer—barely had to break a sweat. In those Democratic-leaning districts, there wasn't much incentive for the party's base voters to show up.

Gillespie was never able to keep up with Warner on the financial front: The incumbent outspent the challenger by a better than 2-to-1, and because polls didn't show it as a single-digit race until the final two weeks, outside conservative groups and the National Republican Senatorial Committee never came in to help Gillespie.

Gillespie still had enough money, in the end, to get his message out. And the message—that Warner was just a typical Democrat, in a year when typical Democrats are decidedly out of favor—worked well enough to make the race tantalizingly close. Now, depending on whether there is a recount, Warner may be able to exhale and keep his seat six more years, while Gillespie waits for the next possible statewide contest, and wonders what might have been.

This article is from the archive of our partner National Journal.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.