The balance of power of the US Senate now depends on the state of Virginia after a Democratic victory was confirmed in Montana.
Jim Webb is celebrating, but could face a recount
If the Democrats - who have already won control of the House of Representatives - maintain their narrow lead there, they will win control of the Senate.
But with the vote is extremely close and will leave open the possibility of a recount in Virginia.
This would mean the result of the election could be unclear for weeks.
Democrat Jim Webb has claimed victory in Virginia with a lead of 0.3 percentage points over incumbent George Allen, but counting there continues.
"The votes are in and we won," said Mr Webb, a former Naval Secretary under Ronald Reagan who later became a Democrat.
The New York Times reported that with all votes counted Mr Webb had 1,172,411 votes to Mr Allen's 1,165,149, a lead of some 7,000.
But the final result in Virginia may not be officially declared for some weeks.
Local election officials have begun a standard, week-long certification procedure - double-checking the vote totals for mathematical and clerical errors - after which Mr Allen will probably be able to demand a recount because of the closeness of the ballot.
This could push the date for the final naming of a winner towards Christmas.
Mr Allen had been expected to win the state - in which he was once governor - easily.
But his campaign suffered after he was caught on video calling a man of Indian descent a "macaca" - a macaca is a genus of monkey.
In Montana, counting was delayed after officials in Yellowstone, the state's largest county, decided to start counting all the votes again because of difficulties with the new equipment.
But just after midday local time (1700GMT) it was confirmed that Democrat Jon Tester had taken the seat from incumbent Conrad Burns - a senator for 18 years - by fewer than 5,000 votes.
The Democrats had tried to paint Mr Burns as a symbol of what they called the Republican "culture of corruption", following revelations that he accepted $150,000 (£78,000) in donations from the lobbyist Jack Abramoff, who has been jailed for conspiracy and fraud.