Some of the biggest names in his party sat out the race or even switched sides. The governor he depended on to rally the troops disappeared into a fog of scandal. Many of the money men who had provided oomph in past elections vanished.

Given the obstacles Virginia Attorney General Ken Cuccinelli II has faced this year — some beyond his control, some of his own making — the surprise in Tuesday’s vote for governor may be that the Republican candidate has kept the race as close as he has.

Two days before the vote, Cuccinelli finds himself lagging in the polls. He’s so far behind financially that the Democrats outspent his campaign on TV ads by 10-to-1 last week. As he crisscrosses the state this weekend, speaking mainly to his conservative base, Cuccinelli is presenting himself as the scrappy underdog, the fighter who thrives on coming from behind.

“The truth is our friend,” he told a gathering of fewer than 100 people in Bristow, in Prince William County, last week at an appearance with Louisiana Gov. Bobby Jindal. “The more you get to know about me, the better we will do.”

But many GOP strategists, politicians and donors share three deep worries: As Virginians have learned more about Cuccinelli, they have become less likely to vote for him. The Republican’s campaign failed to give independents, women and minorities reasons to do so. And Cuccinelli’s lack of resources has made it hard for him to counter relentless negative advertising from Democrat Terry McAuliffe’s side. About two-thirds of Republican Gov. Robert F. McDonnell’s top donors in 2009 have given Cuccinelli little or nothing, according to a Washington Post review of finance records.

“No campaign is ever an easy one, and they’re made much more difficult when there are so many outside influences that one has absolutely no control over,” said Chris LaCivita, Cuccinelli’s chief campaign strategist. “Our attitude has always been to worry about the things that we can control.”

A strong start

The first thing the Cuccinelli campaign controlled was how the Republicans chose their candidate for governor. Sixteen months ago, mustering support from tea party activists and Christian conservatives, the attorney general’s backers forced a convention, instead of a primary, and wrestled the nomination away from Lt. Gov. Bill Bolling, the favorite of many party insiders. Bolling has refused to endorse Cuccinelli, as have several GOP mayors and former legislators.

Cuccinelli looked strong. As a state senator from Fairfax County, he had long bucked his party’s leaders, dismissing those who believed that compromise was more important than standing tall for principle. Now, he had the victory to show that the party’s right flank was ascendant.

Cuccinelli’s camp had every right to view the path to the governor’s mansion as manageable. In nine straight governor’s races, going back to 1977, Virginians have elected the party opposite to the one that won the White House the year before. McAuliffe was trounced in his first bid for governor, in 2009, winning only 26 percent of the vote in the Democratic primary. And Republicans had dominated fundraising that year, with McDonnell spending $24 million to Democrat R. Creigh Deeds’s $14 million.

The Cuccinelli campaign saw opportunity at every turn. Supporters figured that Virginians’ root conservatism, President Obama’s unpopularity, growing opposition to the president’s health-care overhaul and questions about McAuliffe’s checkered business career would give their man the tools to win.

Down to the final weekend of campaigning, the Cuccinelli camp is trying to overcome its funding disadvantage with an almost hourly drumbeat of appearances, speeches, news releases and ads seeking to tap into public concern about Obamacare.

But the decision to push for a convention, and the resulting ticket of three outspoken social conservatives — Cuccinelli, lieutenant governor candidate E.W. Jackson and attorney general hopeful Mark D. Obenshain — may have been shortsighted, said Del. L. Scott Lingamfelter (R-Prince William), who sought the lieutenant governor nomination.

“Independents are a big piece of the picture in Virginia, and you don’t win without them,” he said. “At a convention, you don’t talk to independents; in a primary, you have to reach out to them.”

In the spring, as McAuliffe visited rural Virginia, Cuccinelli published his book bashing Obama’s health-care overhaul, and he promoted it in Iowa and New Hampshire, spending time with reporters from conservative outlets such as National Review, Newsmax and Fox News.

A top Cuccinelli aide said campaign advisers did not know about the book until shortly before it was published and were surprised that he would put out harsh anti-government rhetoric at the start of a campaign that needed support from independents.

“The book tour was ill-conceived,” said a Republican strategist who has run several Virginia campaigns. “It took him out of Virginia and got him back into divisive social issues. He should have been here, doing interviews regularly with local TV and weekly papers.”

The funding gap

Cuccinelli has been hampered from start to finish by a growing gap in funding. McAuliffe has raised about $35 million, compared with Cuccinelli’s $18 million.

Four years ago, McDonnell’s largest single donor other than Republican Party organizations was the U.S. Chamber of Commerce, which spent $973,000 on his campaign. This year, the chamber gave Cuccinelli nothing.

Asked to explain that decision, a spokesman for the business association, Blair Latoff Holmes, said only that “the chamber is not involved in the Virginia governor’s race.”

Of the 43 donors who contributed $50,000 or more to McDonnell four years ago, 27 made no major gifts to Cuccinelli this year, The Post found.

“He didn’t get the money,” said Bob Holsworth, a longtime Richmond political analyst and a principal at DecideSmart, a public policy strategy firm. “The traditional funders of the Republicans, the McDonnell funders, they sat on their hands.”

The 27 missing donors gave a total of $2.3 million in 2009. Most of those contributors gave to Republicans in other races this year. The Virginia Association of Realtors and Premium Distributors of Virginia, one of the state’s largest beer wholesalers, switched sides and gave to McAuliffe.

Holsworth said many business leaders worried that Cuccinelli would be insufficiently supportive of business and devote too much energy to fighting abortion and same-sex marriage.

Mark Kington, an Alexandria venture capitalist who gave $83,000 to McDonnell in 2009, said he steered clear of Cuccinelli because “his position on climate change to me was a real non-starter, and I told him as much.”

Kington, a former member of the University of Virginia’s board of visitors, donated $1.5 million with his wife to endow a professorship in climate change research. Cuccinelli, a longtime skeptic on climate change, spent two years as attorney general investigating whether a U.Va. professor had manipulated data to show rising temperatures on Earth. The university fought back, and the Virginia Supreme Court ruled for the school.

Kington, a moderate Republican and former business partner of Sen. Mark R. Warner (D-Va.), said he would not have supported Cuccinelli even if climate change weren’t an issue. “It may be time to vote for the third-party candidate,” he said, “if only to send a message to the Republican Party that we need pragmatic solutions, not positions that are unbending.”

LaCivita said that being lapped in fundraising was evidence that Cuccinelli couldn’t be bought. The strategist boasted about a Richmond lobbyist who said donors didn’t want to give to the Republican because “Ken Cuccinelli is unlobbyable . . . a badge that he wears proudly.” But LaCivita conceded that it hurts “at the end of the day if you don’t have the money to combat what you’re being called. The sad reality is, you can sell anything on TV.”

Among the McDonnell donors who have steered clear of Cuccinelli, four are current or former trustees of a Virginia public university, and two are active in promoting research on climate change. The list also includes a New York financier who contributes heavily to pro-gay marriage causes and a Charlottesville hedge fund manager who also gives to Planned Parenthood, which has spent more than $1 million on ads portraying Cuccinelli as antagonistic to women.

The gender gap

Holsworth said a gender gap of “unimaginable proportions” was clear from the day in 2012 when hundreds of women “showed up at the Capitol — organized by Facebook, not the parties — to protest transvaginal ultrasounds,” the invasive procedure Republican legislators proposed to require of women seeking most abortions. “Cuccinelli’s folks underestimated the continuing and fervent interest that many women have in this campaign as a result,” Holsworth said.

Former governor L. Douglas Wilder, a Democrat who publicly flirted with endorsing Cuccinelli before siding with McAuliffe, said the Republican unnecessarily “united women against him.”

Cuccinelli could have maintained his principled opposition to abortion yet assured women, as McDonnell did four years ago, that he would not roll back their rights, Wilder said. He said Cuccinelli should have told women that he opposes abortion on religious grounds, but “‘I am a protector of the law and the laws relative to the rights of women will not be changed under my direction. . . . I am going to be a governor for all Virginians.’”

John H. Hager, a former lieutenant governor who later served as head of the state Republican Party, said Cuccinelli has been damaged by McAuliffe’s ads focusing on abortion and by Cuccinelli’s decision to withhold support, along with only three other state attorneys general, when the Violence Against Women Act was renewed last year.

“He’s got his reasons he did what he did, but they’re easy things to use against somebody,” Hager said.

Campaign advisers say they urged Cuccinelli to find ways to appeal to women and independents. One adviser, who asked not to be named because internal deliberations were confidential, said he pressed the candidate to adopt the cause of Elizabeth Daly, a University of Virginia student who was arrested and charged with three felonies after state Alcoholic Beverage Control agents saw her outside a supermarket carrying a carton of bottled water. The agents believed that Daly was an underage customer who had just bought beer. Charges were dropped, but only after Daly spent 36 hours in custody.

“Hundreds of thousands of Virginia women who find Ken anathema to some degree would have rallied to how that unfortunate young lady was bullied by the ABC thugs,” the adviser said, but Cuccinelli was reluctant to criticize law enforcement.

Cuccinelli’s most acclaimed TV ad, touting his successful effort to win freedom for a man who was wrongly convicted of a felony, was displaced only a week later when he bought TV time to announce that he was giving $18,000 to charity and apologizing for taking gifts in that amount from the same business executive whose much larger presents to McDonnell and his family are at the heart of state and federal investigations.

Through the fall, Cuccinelli has stuck with the rhetoric that has long made him the darling of Christian conservatives and tea party activists, including declarations of his devotion to what he calls “first principles” — he often focuses more on the Constitution, morality and the ideals of limited government than on specific policies or local issues.

GOP strategists also questioned the decision to stress opposition to Obamacare throughout the campaign. “This is a referendum on growing or resisting Obamacare,” Cuccinelli told supporters last week. “If you like it, vote for them. If you don’t, vote for me.”

In last week’s Washington Post poll, 53 percent of Virginians said they believed McAuliffe would do a better job handling health care, compared with 34 percent who said Cuccinelli had the advantage.

Beyond his control

Although trailing campaigns often end in blizzards of recriminations, most Republicans agree that some obstacles Cuccinelli faced were beyond his control. As Obamacare was about to roll out to the public on Oct. 1, Cuccinelli stepped up criticism of the new system. But the government shutdown started that same day, forcing the candidate to shift gears and pronounce his support of federal workers, even as he continued to lead followers in rousing declamations of the federal government as “the biggest opponent of them all.”

“We were debating the shutdown and not the Obamacare fight,” LaCivita said.

“The Cooch has not gotten a break,” said Dave “Mudcat” Saunders, a Democratic strategist from near Roanoke who came out for Cuccinelli, his occasional skeet-shooting partner. “McDonnell has been a drag without question.”

The gifts scandal that has dogged the governor all year relegated him to the sidelines. In the final days, when the sitting governor would ordinarily be out campaigning for his party’s chosen successor, McDonnell presented awards to winners of a food-donation collecting contest, attended a dedication of a building at a community college, and cut a ribbon on a new assembly line at a motorized tricycle plant.

“It’s a handicap,” said Del. Robert G. Marshall (R-Prince William), a longtime ally of Cuccinelli’s. “He started off with a deficit because of the governor’s problems.” Asked how the candidate might have gotten out of the shadow of McDonnell’s ethics controversies, Marshall said, “You’d have to say a novena.”

With polls showing McAuliffe’s lead anywhere from small to large, Tuesday’s outcome is by no means certain. Cuccinelli strategists say that in a race where both candidates have high unfavorable ratings, a low turnout can be expected.

In governor’s races, those who stay home tend to be disproportionately the groups that put Barack Obama over the top in Virginia in 2008 and 2012 — independents, nonwhites, immigrants, newcomers to the state and young people.

The Democrats have the more visible effort to get out the vote; they opened 150 field offices across the state, compared with 39 for the Republicans. Cuccinelli has focused on shoring up his base, bringing in a parade of tea party favorites, including Sen. Rand Paul (R-Ky.), Gov. Bobby Jindal (R-La.) and Sen. Marco Rubio (R-Fla.), as well as Christian conservative and reality TV show star Jim Bob Duggar and his family.

Cuccinelli’s advisers have by no means given up. Late polling indicating that McAuliffe’s lead might be narrowing led LaCivita to say, “We’re still hanging around despite the trials and tribulations of the last eight months. [McAuliffe] hasn’t made the sale yet, and that says something.”