Virginia's gubernatorial candidates Ken Cuccinelli (R) and Terry McAuliffe (D) share their positions on clean energy, coal, and job creation at a forum Thursday at the George Mason School of Law. (Casey Capachi/The Washington Post, footage courtesy of Consumer Energy Alliance)

A joint forum on energy issues with Virginia’s main gubernatorial hopefuls devolved into sharply personal attacks Thursday as businessman Terry McAuliffe and Attorney General Ken Cuccinelli II veered off the topic to heap scorn on each other.

In back-to-back appearances at an Arlington County gathering sponsored by the Consumer Energy Alliance, McAuliffe (D) accused Cuccinelli (R) of being an “ideologue” whose social views would drive business from the commonwealth, and Cuccinelli painted his opponent as a flip-flopper with the cloud of a federal investigation over his head.

Energy issues have been at the heart of many of the most contentious debates in the contest, and each man has used the subject to raise questions about the other’s integrity.

Cuccinelli spoke at length about GreenTech, an electric-car company co-founded by McAuliffe that is being investigated by the Securities and Exchange Commission for its use of a federal program that gives special visas to foreign investors in U.S. companies.

“Will [Virginians] vote for someone who may enter office with a federal investigation hanging over his head?” Cuccinelli asked. “That would be a first.”

Terry McAuliffe answers questions from the media Thursday after a joint forum on energy issues at the George Mason University School of Law auditorium in Arlington. (Astrid Riecken/The Washington Post)

McAuliffe had touted his work with GreenTech and another firm, Franklin Pellets, to demonstrate his commitment to clean energy as well as boosting the economy. But neither venture has produced the jobs McAuliffe had hoped for, and Cuccinelli cited GreenTech as an example of what is wrong with federal energy policies.

“Terry’s GreenTech failure and Solyndra’s failure are stark reminders that government doesn’t pick winners, they pick losers, at your expense. At taxpayers’ expense,” he said. (Solyndra was a failed solar panel company that left taxpayers liable for $535 million in federal guarantees.)

Cuccinelli, meanwhile, faces an investigation into his office by the state inspector general over its handling of a complicated legal dispute concerning gas royalties in southwest Virginia. An assistant to Cuccinelli has been accused of giving improper legal help to oil companies as they battle with landowners over the royalties. The attorney general’s office has said the lawyer did nothing wrong.

McAuliffe and outside groups have also repeatedly hammered Cuccinelli for his 2010 efforts as attorney general to procure records from Michael Mann, who was then a climate researcher at the University of Virginia.

Cuccinelli has said he was investigating whether Mann might have fraudulently used state funds, but Democrats accuse Cuccinelli of conducting a “witch hunt” because he disagrees with Mann’s views on climate change. (After Thursday’s event, Cuccinelli did not directly address a reporter’s question about his “current view of global warming.”)

McAuliffe cited the Mann case as an example of why Cuccinelli would be “bad for business,” lumping it in with Cuccinelli’s positions on such social issues as abortion and gay rights.

Cuccinelli, in turn, highlighted McAuliffe’s change in position on offshore drilling. When McAuliffe ran for governor in 2009, he said he was opposed to offshore drilling in Virginia. But he has changed his position, and his campaign has attributed the switch to unspecified new technology that makes drilling safer.

More Post coverage of the race for Virginia governor.

“Terry wants you to believe he’s suddenly for offshore drilling, but you can’t trust him on that,” said Cuccinelli.

He accused the Democrat of garnering support from “a left-wing radical environmentalist,” referring to a hefty contribution McAuliffe received from billionaire financier and environmental activist Tom Steyer.

McAuliffe has also shifted his stand on coal. In 2009, he said he was opposed to any new coal-fired power plants being built. But in May, he said he wanted “to make sure we have a healthy workforce of coal” and “to make sure this vital industry here in Virginia continues to grow,” according to the Bristol Herald Courier.

McAuliffe’s change on coal hasn’t stopped Republicans from seeking to tie him to the Obama administration’s policies. Obama has called for the Environmental Protection Agency to create new carbon pollution standards for new and existing power plants, which could hamper the coal-fired plants currently running in Virginia.

“What Terry doesn’t realize is that the war on coal he’s supported is a war on Virginia’s poor,” Cuccinelli said.

McAuliffe spent much of Thursday’s forum talking about issues unrelated to energy, and he focused on a Washington Post article outlining Cuccinelli’s relationship with the fathers’ rights movement.

McAuliffe called Cuccinelli’s positions on fathers’ rights issues — which include divorce, custody and child-support laws — “just beyond my comprehension.”

Speaking to reporters after the event, Cuccinelli disputed the notion that he had a poor record on issues important to women.

“I’m the only candidate in this race who has a track record of protecting women,” Cuccinelli said, “whether it was preventing sexual assault at [the University of Virginia] or running numerous domestic violence programs in the attorney general’s office, starting [an effort to fight human trafficking] in Virginia from scratch. . . .

“I’m the only candidate with a positive track record in that respect,” Cuccinelli continued, looking at a television reporter who had asked him about the subject, “and I notice that you’re not taking any notes about that.”