Democratic congressional candidate John Delaney failed to vote in two recent elections, a record that drew a swift rebuke Wednesday from his foe in Maryland’s most closely watched race, Rep. Roscoe Bartlett (R).

Delaney, the founder of the Chevy Chase commercial finance firm CapitalSource, is making his first run for office, though he has been a major fundraiser for other candidates in the past. He secured the Democratic nomination to face Bartlett in the 6th district, which was redrawn to favor Democrats, by scoring an upset victory against state Senate Majority Leader Rob Garagiola (Montgomery) in the April primary.

Delaney, a Potomac resident, did not vote in the 2006 general election, which included the gubernatorial contest between Martin O’Malley (D) and Robert Ehrlich (R), or the 2010 primary election, according to Maryland voter records. His failure to vote in those races was first reported by The Baltimore Sun.

Bartlett has been fighting an uphill battle to fend off Delaney, who is better-financed and is running on hospitable turf that includes a slice of Democratic-leaning Montgomery County. The Republican’s campaign seized on the news of his voting record.

“Congressman Bartlett takes his basic civic duty of voting very seriously,” said Bartlett spokesman Ted Dacey. “John Delaney’s failure to vote in important elections raises a critical question: if John Delaney can’t be bothered to vote for himself, how can Maryland families ever trust him to vote for them?”

US House Representative, Congressman Roscoe Bartlett (R-MD) pictured in 2011. (Melina Mara/THE WASHINGTON POST)

Other than those two, Delaney has voted in every other recent election, and his campaign downplayed the importance of the news.

“This was the exception, not the rule, and John’s voting history shows that,” said Justin Schall, Delaney’s campaign manager. “This issue is a distraction from the votes that really matter. The 6th district needs a Congressman focused on jobs instead of Bartlett who has voted for years to privatize Social Security and to end Medicare as we know it.”

Delaney’s past political behavior was also an issue in his Democratic primary race, though for a different reason. In 2010, Delaney made a campaign donation to Republican Andrew P. Harris, just before Harris succeeded in ousting Rep. Frank Kratovil (D) from the Eastern Shore-based 1st district. Garagiola’s camp cited the donation as evidence that Delaney was a disloyal Democrat.

Ted Mellnik contributed to this article.