Three months ago, most everyone had written off Tom Perriello’s congressional campaign.

He was behind 30 percentage points in the polls. Victory would be near impossible — or so everyone thought.

After a night of watching election returns that were as volatile as the Dow Jones Industrials Index, Perriello ’96 LAW ’01 was on his way to representing Virginia’s 5th Congressional District. In an monumentally close race, Perriello was shown leading his opponent, Republican Rep. Virgil Goode, by a mere 31 votes with all precincts reporting, in unofficial results provided by the Virginia Board of Elections at 3:37 p.m. Wednesday.

CNN reported Perriello leading by 80 votes at 10:45 p.m. Wednesday.

Perriello credited this turn of events to a new style of Virginia Democrats, that of Mark Warner and Jim Webb, which he said focuses on putting real solutions on the table.

The small separation between the two candidates ­— just two-hundredths of a percent — is well within the .5 percent margin that would allow the Commonwealth to foot the bill for a recount. Under Virginia law, a recount would have to wait until after Nov. 24, when the Board of Elections is expected to certify the results, whereupon Goode could ask for a recount.

In an interview with the News Wednesday Night, Perriello said he is committed to seeing every ballot tallied. Still, once all the dust settles, Perriello said he believes his campaign will have pulled off one of the biggest upsets of the year.

Brian Bills ’11, special assistant to the candidate on the Perriello campaign, was similarly confident in an interview Wednesday night.

“We have been gaining all day,” Bills said of Perriello’s move past Goode in returns today. “No one has a clue about what will happen with the provisional ballots, but we think they will swing our way.”

On Tuesday night, the Associated Press called the race Perriello, then retracted their projection after it became apparent that there were several malfunctions in the voter tallying system. By Wednesday morning, those glitches had been corrected, but the status of some absentee and provisional ballots still needs to be determined.

“It’s been a dramatic 24 hours,” Perriello said. “We haven’t slept for a while.”

Goode held a conference call with reporters on Wednesday morning and expressed confidence in winning the campaign, according to the Richmond Times-Dispatch. He did not, however, rule out involving lawyers in the dispute. (A spokesperson for Goode was unavailable for comment Wednesday evening.)

Republican Minority Deputy Whip Rep. Eric Cantor told the Richmond Times-Dispatch on Wednesday that Goode has the full backing of the GOP House Caucus.

If Perriello ends up victorious, Democrats would hold a majority of seats in Virginia’s congressional delegation for the first time since the 106th Congress.