Jim Webb gestures during remarks at an election night event on Tuesday in Vienna, Va. ((Evan Vucci/Associated Press))

The Democratic Party seized control of the U.S. Congress Wednesday night for the first time in a dozen years after picking up a sixth and final Senate gain in Virginia.

The Democrats won a solid majority in the U.S. House of Representatives in the mid-term elections on Tuesday, but had to wait an extra day on the Senate due to extremely tight races in Virginia and in Montana.

The party had picked up seats in Ohio, Pennsylvania, Missouri and Rhode Island.

Jim Webb, a Vietnam veteran who once was a Republican, defeated incumbent George Allen in the bitterly contested Virginia race.

According to the Associated Press, Webb and Allen were separated by 7,236 votes with over 2.3 million counted. Virginia has had two statewide vote recounts in modern history, but both resulted in vote changes of no more than a few hundred votes.

An adviser to Allen, speaking on condition of anonymity, told the Associated Press that the senator was disinclined to request a recount if the margin didn't change substantially within the next several hours, and that a concession speech was possible as early as Thursday.

The result would leave the Senate with 49 Democrats and 49 Republicans. Two Independent senators, Joseph Lieberman of Connecticut and Bernie Sanders of Vermont, will caucus with the Democrats.

A major upset

The defeat in Virginia was a major upset for a candidate who early in the year was talked about as a possible Republican leadership candidate in the coming years.

But the son of the Hall of Fame football coach of the same name courted controversy during his campaign, using an obscure racial slur to describe one of Webb's volunteers.

Later, he cited depictions of sex and war in novels written by Webb in the 1970s, as well as comments made by his opponent in the same decade about female naval officers, as evidence of his attitudes towards women.

Exit polls conducted in Virginia seemed to suggest that Webb won the women's vote by a sizeable margin.

Meanwhile, Republican incumbent Conrad Burns lost by about 3,000 votesto Democrat Jon Tester in a tight battle in Montana that was decided earlier Wednesday.

Problems with a voting machine in one county delayed the count.

With files from the Associated Press