A House Democrat on Tuesday took a subtle swipe at President Obama and Speaker Nancy Pelosi (D-Calif.) in his latest campaign ad.

Two-term Rep. Joe Donnelly's (Ind.) TV spot features a photo of Obama, Pelosi and House Minority Leader John Boehner (R-Ohio) as he references the "Washington crowd."

"No one should ever be rewarded for breaking the law," Donnelly says in reference to illegal immigration. "That may not be what the Washington crowd wants. But I don't work for them, I work for you."

The ad comes amid debate over the decisions of some centrist and vulnerable Democrats to shun Obama on the campaign trail.

Democratic National Committee Chairman Tim Kaine said Monday that Democrats who are running away from the president are making a "mistake" because Obama's agenda will bolster candidates' chances of winning.

Donnelly is an anti-abortion-rights Democrat who voted for the healthcare reform law this year. He faces a challenge from state Rep. Jackie Walorski (R), but leads 52-35 percent, according to a recent poll conducted by the anti-abortion group Susan B. Anthony List.