With Republican Sen. Conrad Burns' loss in Montana, the Democrats would gain control of the Senate if Webb's lead holds. The margin between the two Virginia candidates was about 7,000 votes.
"The votes are in and we won," Webb declared. With 99 percent of precincts reporting, Webb had 1,169,285 votes, or 49.6 percent, to Allen's 1,162,577, or 49.3 percent.
• Check Your State, Check Your Race by clicking BALANCE OF POWER dropdown menu above.
Allen's campaign, however, said the Senator would wait for a full review of the Virginia vote.
"The conclusion of the canvass will be the final official results," said Ed Gillespie, the former Republican National Committee chairman and adviser to Allen.
Representatives from both campaigns and party officials were at polling places across Virginia as the canvass was under way. The state has until Nov. 14 to complete it, Gillespie said.
As a practical matter, "the vote's been counted and Jim won," said Webb spokeswoman Kristian Denny Todd.
"This isn't hanging chads or anything like that. I don't think the voters will like it if the Allen camp tries to make this into a hanging chad situation because it's not the same thing," she said.
As part of the canvassing process, officials were determining whether provisional ballots — a tiny percentage of the total cast — could be counted and added to the totals.
There are no automatic recounts in Virginia, but state law allows a candidate who finishes a half-percentage point or less behind to request a recount paid for by state and local governments.
A former governor once popular for abolishing parole, Allen had once been expected to cruise to a second term this year as a warmup for a presumed 2008 presidential run.
His solid conservative credentials and his sunny persona invited comparisons with the archetypal Republican, Ronald Reagan. In late July, Allen led Webb by 16 points in the year's first independent statewide poll.
Then came Aug. 11, the day Allen pointed out S.R. Sidarth, a 20-year-old Virginia-born man of Indian descent working as a Webb campaign volunteer, and introduced him at an all-white rally as "macaca," an obscure racial slur that denotes a genus of monkeys.
Sidarth was tracking Allen across the state, videotaping his public appearances, and his video of Allen's macaca moment became a major national story and was grist for comedians and cable talk shows.
Allen eventually apologized to Sidarth, but not until the comment had already provoked widespread scorn. By then, the political damage was done, and more was to come.
In mid-September, Allen bristled at a reporter for "making aspersions" about his religion when he was asked at a debate whether his mother was Jewish. The next day, Allen, 54, who was raised Christian, confirmed that his maternal grandparents were Jews, but said his mother revealed the secret to him only in August.
Then came allegations from some former football teammates from the University of Virginia that Allen had commonly used a six-letter epithet against black people. Allen denied ever using the word, and other teammates came forward to rebut the claims.
As Webb tied Allen to President Bush and the deadly U.S. occupation of Iraq, Allen battled back. He accused Webb of denigrating women in a 1979 magazine article decrying admission of women to the Naval Academy. Allen later tried to portray sexual descriptions in Webb's six best-selling war novels as demeaning to women.
Webb, a Naval Academy graduate and decorated Vietnam veteran who served as Navy secretary under Reagan, bitterly opposed the war in Iraq and switched to the Democratic Party.
With a margin greater than that but less than 1 percentage point, the trailing candidate can still seek a recount but has to pay the costs if the results are unchanged. Either way, a recount could not begin until after the State Board of Elections certifies the results Nov. 27; the losing candidate has 10 days after that to request a recount.