RICHMOND, Va. -- State Sen. R. Creigh Deeds won Virginia's three-way Democratic primary for governor Tuesday with shocking ease, defeating a former Clinton White House insider and a former legislative colleague.

The victory sets up a Deeds rematch with Republican Bob McDonnell, who beat him in the 2005 attorney general election by 323 votes out of nearly 2 million cast.

"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 had about half the vote in the three-way race with nearly all precincts reporting. His opponents each had around a quarter of the vote.

"The rematch isn't so important to me," Deeds said.

Deeds had trailed both his opponents in fundraising.

McDonnell is a conservative with strong ties to religious broadcaster Pat Robertson. He was unopposed for the GOP nomination.

In other races, former Virginia Finance Secretary Jody Wagner won the Democratic lieutenant governor primary over first-time candidate A. Michael Signer.

Deeds, the only Democrat in the race not from the Washington, D.C., suburbs, piled up surprisingly large margins across the state, including the northern Virginia region that rivals Terry R. McAuliffe and Brian J. Moran call home.

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.

He seized on the down economy by promising to bring jobs to Virginia, touring the state with his confidante Bill Clinton. 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, 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, with by far the least money raised of the three and a staff so sparse that he sometimes drove himself to campaign events, hewed toward the middle.

His campaign finances were so precarious that he was forced to lay off some of his field staff so that he could afford to run television ads in the final two weeks of the campaign.

For much of the campaign, Deeds remained out of the crossfire between bitter rivals Moran and McAuliffe. Because he chose to remain 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.

Only toward the end of the campaign, after Deeds began surging in polls, did his two opponents take aim at him for Senate votes against efforts to close a loophole in state laws that exempt firearms sales at gun shows from the background checks required of federally licensed gun retailers.

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