There’s a third candidate in the Virginia governor’s race with Ken Cuccinelli II (R) and Terry McAuliffe (D) besides the Libertarian Party’s Robert Sarvis.

It’s Cuccinelli’s status as a sitting attorney general.

From the moment Cuccinelli put aside decades of precedent by not resigning to campaign full time for governor, his dual role as political candidate and Virginia’s top legal counsel has shadowed the race , sometimes in helpful ways , sometimes as a hindrance.

Cuccinelli has been able to use the office to portray himself as a champion fighting for the commonwealth, whether by arguing the innocence of a wrongly convicted prisoner or announcing another victory against Medicaid fraud.

But by holding onto his post, Cuccinelli also has complicated his campaign by creating real and apparent conflicts of interest. He has opened himself up repeatedly to accusations by his opponents that his political aspirations had an impact on his legal duties. These include his office’s role in complex litigation over natural gas royalties in southwest Virginia, a tax dispute involving a wealthy donor whose gifts tarnished Gov. Robert F. McDonnell (R) and a fight over purging thousands of names from voter rolls.

The advantages and disadvantages of Cuccinelli’s position were apparent on a single day this month. First, he announced triumphantly that his office had negotiated a $37 million Medicaid fraud settlement with McKesson on allegations that the pharmaceutical wholesaler had inflated the prices of prescription drugs.

But that same day, the Democratic Party of Virginia went to federal court arguing that the Virginia State Board of Elections had wrongly purged 57,000 names from voter rolls. The Democrats’ lawsuit named Cuccinelli as a co-defendant and noted that he had a “direct personal interest” in its outcome.

“It’s just another conflict of interest for Attorney General Cuccinelli,” said Lauren Harmon, executive director of the state Democratic Party.

In the end, the federal judge rebuffed the Democrats, saying there was no evidence that election officials improperly removed the names of people who had moved out of state.

Daniel Palazzolo, a professor of political science at the University of Richmond, said Cuccinelli’s decision to remain in office has probably not made much of a difference in the race, except to distract the candidate from fundraising or burnish his reputation for sticking to principle even when it costs him support.

“I do think he’s a maverick,” Palazzolo said.

But Robert N. Roberts, a political science professor at James Madison University, said Cuccinelli’s staying in office has harmed him more than it’s helped.

“The fact that he’s been an activist attorney general has helped him with his base. It hurts him if he tries to move to the center,” Roberts said.

Trailing in polls

With just about a week to go before the Nov. 5 election , Cuccinelli trails McAuliffe, a McLean businessman who has never held elective office, in all recent polls.

Cuccinelli remained in office partly because he is not wealthy and his family relies on his approximately $157,000-a-year salary. Cuccinelli also has pointed out that no other state has a tradition of attorneys general resigning to seek higher office — an assertion backed up by PolitiFact Virginia , which traced the custom to 1957.

McAuliffe’s patron, former president Bill Clinton, was Arkansas attorney general when he won his first governor’s race. On the other side of the Potomac River, Maryland Attorney General Douglas F. Gansler (D) is running for governor.

“It’s kind of a bizarre rule because attorneys general around the country don’t leave office when they run for higher office and, even in Virginia, attorneys general do not leave office when they run for reelection,” Frank B. Atkinson, a Republican activist who has written two books on Virginia government, said in an e-mail.

Cuccinelli’s role as attorney general has given him a highly public stage. On Friday, Cuccinelli handed over proceeds from a record Medicaid fraud settlement with Abbott Labs to the state’s underfunded retirement account for law enforcement members. Brian Gottstein, a spokesman for the office, said its Medicaid fraud team had returned $1.6 billion in the past 3½ years — or more than all other recoveries combined since the unit was created 30 years ago.

Cuccinelli also plans to argue in person in November for a writ of actual innocence for Johnathan C. Montgomery, whose sexual assault conviction was overturned. Cuccinelli also has highlighted his role in helping to clear Thomas Haynesworth, who spent 27 years in prison after a wrongful conviction.

But Cuccinelli also has spent time addressing issues that created conflicts of interest, beginning with the scandal that has damaged McDonnell .

It was Cuccinelli’s office that initiated a criminal investigation against Executive Mansion chef Todd Schneider, who eventually pleaded no contest to charges that he had stolen state-purchased goods from its kitchen. Schneider tipped investigators to gifts that McDonnell and his family received from Star Scientific chief executive Jonnie R. Williams Sr., triggering a federal investigation that is still underway.

Then it came to light that Cuccinelli had accepted $18,000 in gifts from Williams. Cuccinelli also had owned more than $10,000 of the company’s stock — even though Star Scientific was fighting the state over a potential $1.7 million tax dispute.

The tax case

Democrats accused Cuccinelli of sitting on the tax case, while the chef’s defense team chided him for failing to recuse himself. When Cuccinelli did recuse his office, another consequence emerged: Taxpayers were left with a $244,000 bill for outside legal counsel.

Cuccinelli said his failure to disclose about $5,000 in gifts from Williams was inadvertent. A state prosecutor who reviewed Cuccinelli’s gift disclosures at Cuccinelli’s request found no wrongdoing . Gottstein also said that outside counsel in the chef’s case would have been necessary in any event because the office had competing roles as the chef’s prosecutor and counsel for state employees who were potential witnesses.

Cuccinelli has tried with mixed success to put the gifts controversy to rest. With some difficulty, he scraped together $18,000 to donate to charity in September, but even his supporters said that by then the damage had been done. The issue bubbled up again last week, when Democrats, citing documents obtained through a Freedom of Information Act request, accused Cuccinelli of lowballing the gifts’ value .

Oil and gas

Cuccinelli also has had trouble shaking controversy over his office’s role in a legal fight over natural gas royalties between energy companies and southwest Virginia landowners. McAuliffe has accused Cuccinelli’s office of stepping in because the energy industry, including a company in the legal dispute, has given generously to his campaign.

The case revolves around the 1990 Virginia Gas and Oil Act and its attempt to allow energy companies to extract methane from coal seams despite legal uncertainty about whether the gas belonged to the owner of the land or the coal. As administered by the Virginia Oil and Gas Board, the law requires that the companies put the disputed royalties in escrow until ownership claims are resolved.

Attorneys for the landowners have been frustrated that many claims have been in limbo for years despite rulings by the U.S. Supreme Court and the Virginia Supreme Court that have attempted to settle the conflict.

At the center of the morass was Sharon Pigeon, a senior assistant attorney general who has been assigned to the Virginia Gas and Oil Board since 2002. While intervening to defend the state law, Pigeon also collaborated in ­e-mails with two energy companies in their litigation with landowners, prompting a U.S. magistrate to express shock.

Virginia’s inspector general determined that Pigeon properly shared legal strategy in some instances but “inappropriately” went too far in others. The inspector general also found that Pigeon’s superiors weren’t aware of the extent of her communications until last year.

Critics said it looked as if either Cuccinelli didn’t know what his staff was doing in a case that affected hundreds of landowners or he gave approval, tacit or otherwise.

“For Cuccinelli, it’s a terrible problem,” Roberts said.