The victory sets up a Deeds rematch this fall with Republican Bob McDonnell, who beat him in the 2005 attorney general election by 323 votes out of nearly 2 million cast _ the closest statewide election in modern Virginia history.

"I'm a Presbyterian. I believe things happen for a reason," a jubilant Deeds, surprised at the ease of his victory, said in a telephone interview with The Associated Press.

Deeds took nearly 50 percent of the vote to 26 percent for Terry R. McAuliffe and nearly 24 percent for Brian J. Moran, unofficial totals showed. Nearly 320,000 people voted in the race, about 6 percent of the state's 5 million registered voters but more than officials predicted. Deeds piled up surprisingly large margins across the state, including in the Washington, D.C. suburbs of northern Virginia that his opponents call home.

"The rematch isn't so important to me," Deeds said, downplaying the prospect of a grudge against McDonnell, a conservative with strong ties to Pat Robertson. He was unopposed for the GOP nomination.

Deeds raised only about $3.7 million, far less than his rivals. McAuliffe, who dominated fundraising, received nearly twice Deeds' total. Deeds' staff was so sparse he often drove himself to campaign events, and he had to lay off field staffers at one point so he could afford to run television ads in the final two weeks of the campaign.

A euphoric crowd of about 200 in a Charlottesville hotel waved placards and chanted "Deeds, Deeds, Deeds" as he arrived.

"The thunderstorms, the rain, the hail didn't stop you from turning out," Deeds said, referring to fierce afternoon storms across Virginia.

McAuliffe and Moran both called Deeds to congratulate him by 8:30 p.m.

Both men had criticized Deeds for legislative votes supporting Virginia's broad, pro-gun laws, actions popular in rural areas that don't play well in cities and affluent suburbs.

McAuliffe's political connections from his days as chief fundraiser for Bill Clinton and chairman of the Democratic National Committee helped him dominate press coverage and amass a hefty amount of cash in his first bid for elective office.

The indefatigable McAuliffe, who had campaigned statewide with the former president, told dejected backers the campaign was "one of the greatest experiences of my life." He received polite applause when he exhorted them to help elect Deeds in November.

Asked about his own political future, McAuliffe kept his options open.

"I actually enjoy this," McAuliffe said of campaigning. "I had a great time. I loved it."

He seized on the down economy during the campaign, promising to bring jobs to Virginia. However, that left the venture capitalist open to attacks over his involvement in a telecommunications firm that made him millions before the company went bust, leaving 10,000 people jobless and costing investors $54 billion.

Moran, a former House Democratic Caucus leader from Alexandria, went farther to the left than his rivals in appealing to liberal activists. He pledged to oppose new coal-fired power initiatives and reverse the state's same-sex marriage ban.

Deeds, a country lawyer from the Alleghany Mountain resort community of Bath County who hewed toward the middle politically, remained out of the crossfire between bitter rivals Moran and McAuliffe for much of the campaign. Because he remained in the Senate, he missed 46 days at the start of the campaign and was barred by state law from raising any money during that time.

It was only after Deeds surged at the polls near the end of the campaign that his opponents criticized him for Senate votes against closing a loophole in state laws that exempt gun show sales from background checks. Federally licensed gun retailers must perform the checks.

Gov. Timothy M. Kaine, the new Democratic National Committee chairman, is barred by the state Constitution from seeking re-election.