George Allen, the Republican fighting Democrat Tim Kaine in Virginia’s closely watched battle for the U.S. Senate, caught some unexpected flak Wednesday over his energy policy in the form of friendly fire from a Republican congressman in Maryland.

During a campaign stop in Gaithersburg on Wednesday, Rep. Roscoe Bartlett, who is in a tough election fight of his own in Maryland’s 6th congressional district, was waxing passionately about the need to move the country beyond fossil fuels.

Sometimes members of his own party don’t seem to understand how critical the need is to push toward new, renewable and environmentally friendly energy sources, Bartlett said.

Then Bartlett started riffing on Allen, who has campaigned hard in Virginia’s coal country with a boisterous defense of fossil fuels.

“I’m not a politician,” Bartlett told supporters while touring a dentist office. “What politicians do is tell you what you want to hear. I have a good example of that: George Allen, who’s a really nice young man, several years ago, he spoke somewhere, and he said some really dumb things about energy. I said, ‘George, you’re too bright a young man to be saying dumb things about energy.’ So he came by my office, and we walked for an hour and a half. He still says dumb things about energy, because that’s what people want to hear. I just can’t do that. I gotta be honest.”

Energy has emerged as an important issue in the tight race between former governors Allen and Kaine. Allen has accused Kaine of being a foot soldier in the Obama administration’s “war on coal,” with stark consequences for the state’s coal mining industry. But Kaine said he has a record of support for coal while also pushing for new forms of cleaner energy. He has accused Allen of failing to see beyond fossil fuels.

On Wednesday, Bartlett sounded as if Kaine might have a point.

Bartlett went on to say that, of course, he hopes Allen will reclaim his old Senate seat when Sen. Jim Webb (D) retires, and that all politicians are hampered by the inability to take unpopular positions no matter how justifiable.

But Bartlett, who has built solar houses since the 1970s and boasts of being the first member of Congress to drive a Prius, remained unabashedly green and said it’s about time the U.S. builds a new industrial base around “green technology.”

“Most of the American people don’t even know we have a problem in this area,” Bartlett said. “And many people on my side of the aisle pooh-pooh the whole thing: if you’re concerned about green things, you’re an idiot.”

Bartlett is in an uphill fight against John Delaney, a Potomac financier, in a district that now tilts Democratic.