Virginia Attorney General Ken Cuccinelli II speaks after his nomination as the Republican candidate for governor at the Virginia Republican convention on May 18 in Richmond. (Steve Helber/AP)

A complex legal dispute over mineral rights in Virginia’s coal country has become the latest battleground in the state’s bitterly fought gubernatorial race, with Democrats accusing Attorney General Ken Cuccinelli II of improperly siding with out-of-state energy companies against Virginians who say the firms cheated them out of natural gas royalties.

Sen. Phillip P. Puckett has asked the state inspector general’s office to conduct an independent investigation into why a senior lawyer in Cuccinelli’s office was “actively advising” two Pennsylvania-based energy companies in several related lawsuits, even though Virginia wasn’t a formal party to them. Although the attorney general’s office acts as an adviser to the Virginia Gas and Oil Board, the board is also not a party.

Puckett (D-Russell) said he was troubled because one of the companies, Consol Energy, has contributed more than $111,000 to Cuccinelli’s gubernatorial campaign. In an e-mail to the inspector general, Puckett urged the office to determine whether the attorney general’s office violated any laws or ethics policies.

Cuccinelli (R) and the companies have denied any wrong­doing. As the state’s legal counsel, Cuccinelli said his office properly intervened only to defend the underlying Virginia Gas and Oil Act against arguments by the landowners’ attorneys that the 1990 law could be unconstitutional. Cuccinelli also rejected the notion that he had taken sides.

“Contrary to some media reports, the gas companies get their legal advice from their own attorneys, not this office,” Cuccinelli said in a statement. “The senior assistant attorney general did communicate with attorneys for the gas companies about the interpretation of the Gas and Oil Act because they shared a common interest with the commonwealth in protecting the law. The gas companies were using the law as their defense in the case, claiming they were following the law when they paid royalties to the property owners.”

Cuccinelli also denied that campaign contributions played a part in his office’s dealings with the energy companies. Cuccinelli, noting that Consol Energy has given to many lawmakers’ campaigns, said he and the company saw differently on a mining bill the company lobbied for in 2012.

“Our job in this case and others is to defend Virginia laws, regardless of who stands to benefit,” Cuccinelli said.

But Democratic gubernatorial candidate Terry McAuliffe’s campaign dubbed the issue Cuccinelli’s “brand new scandal,” and former attorney general Mary Sue Terry, a Democrat, called the intervention “totally inappropriate and wrong.”

The legal dispute involves perhaps hundreds of landowners and millions of dollars in escrow. An escrow account — which includes the disputed natural gas royalties and others — totaled $27.9 million May 31, a spokesman for the attorney general said.

The controversy pits several landowners against two of Virginia’s largest producers of natural gas pumped from coal seams, which is known as coal-bed methane.

Until about 30 years ago, methane produced and trapped in coal seams was vented into the atmosphere during mining operations. But with advances in technology allowing companies to capture coal-bed methane, a novel web of questions arose as to its ownership. Would it belong to the owner of the coal seam? Or the surface landowner where the well is located? And what if someone sold the rights to the coal — would that mean the rights to the coal-bed methane were also sold?

Landowners argue in court papers that EQT Production and CNX Gas, a unit of Consol Energy, at best handled their royalty payments sloppily and, at worst, shortchanged them.

“This amazed me when I discovered it,” said consultant Charles S. Bartlett. Bartlett, a former oil company employee and Emory & Henry College geology professor, investigated suspicions by landowners that the companies were not paying them the natural gas royalties they were owed.

The landowners also argue that the companies have ignored a 2004 Virginia Supreme Court ruling that suggests they are the rightful owners of the coal-bed methane and so improperly placed a portion of the disputed royalties into escrow. In Harrison-Wyatt, LLC v. Ratliff, the court held that selling one’s rights to coal did not include selling one’s rights to the natural gas produced in those coal seams.

In court papers and interviews, however, the companies say they have accurately calculated and paid all required royalties. The companies also assert that the Virginia Supreme Court’s ruling did not resolve the conflict over the royalties between classes of landowners. Therefore, the companies say they have followed the 1990 Virginia Gas and Oil Act and related directives by the Virginia Gas and Oil Board that require the companies to put one-eighth of the disputed royalties into escrow.

The companies also defend the Gas and Oil Act, whose intent was to spur the Appalachian economy by allowing companies and landowners to benefit from the production of coal-bed methane while setting aside proceeds for disputed claims.

“Our interest is to uphold the constitutionality of the act,” Wade Massie, an attorney for EQT Production, said, adding that the attorney general should defend that law. “The state has an interest that the procedure is run correctly and that everyone gets their day in court.”

The attorney general’s assistance came to light in an 85-page opinion issued last week by U.S. Magistrate Judge Pamela Meade Sargent, who was analyzing whether the legal dispute should be turned into a class action.

In a series of e-mails, Senior Assistant Attorney General Sharon M.B. Pigeon discussed legal strategy with Massie and Jonathan T. Blank, who was representing CNX. In one thread, Pigeon highlighted a procedural defect that would allow the companies to seek the dismissal of a plaintiff’s case.

“Shockingly, these emails show that the Board, or at least Pigeon, has been actively involved in assisting EQT and CNX with the defense of these cases, including offering advice on and providing information for use on the Motions currently before the court,” Sargent wrote.

But Cuccinelli said his office’s role should not come as such a surprise, because his office made a court filing last June asserting the state’s interest in defending the Gas and Oil Act. Brian Gottstein, a spokesman for the office, said Thursday that Pigeon’s e-mails were appropriate even if “overzealous” in tone. But he also shared an excerpt of a plaintiff’s pleading that commended her for her cooperation during the discovery phase.

Republicans, meanwhile, accused Puckett of having a conflict of his own: He works for the southwest Virginia bank that manages the trust. Puckett, who acknowledged his employer’s management of the escrow, denied any conflict.

CNX Gas operates as a subsidiary of Consol Energy, which is headquartered in Canonsburg, Pa., near Pittsburgh, and produces more than 54 percent of Virginia’s coal-bed methane, court papers say. EQT Production, a subsidiary of Pittsburgh-based EQT, produces about 35 percent.

Lynn Seay, a spokeswoman for Consol Energy, declined to comment on Puckett’s request for an investigation by the inspector general. She said the company is reviewing the magistrate’s report and “will respond to the court once that process has been completed.” Blank did not respond to a message seeking comment.