Two Democrats in the past two days have shunned President Obama.

Asked during a debate Wednesday night whether he would vote for President Obama, Arizona House candidate Ron Barber (D) demurred.

“My vote is my vote,” he told Republican Jesse Kelly, who he faces in a special election for the seat vacated by Gabrielle Giffords. “And I will not be talking about other elections. I’m focused on beating you on June 12.”

On Wednesday, Democratic North Dakota Senate candidate Heidi Heitkamp went further, telling the Associated Press that Obama had “failed in the one test America had for him, which was to unite the country.” Heitkamp is running for the seat held by retiring Sen. Kent Conrad (D).

Numerous Democrats have opted out of appearances with Obama in their states, claiming scheduling conflicts.

Democrats in conservative territory always highlight their policy differences with the president. And in some cases, they avoid even saying if they support the president.

“It’s hard because of course they’re going to accuse you of dodging questions,” said David Mowery, who helped former Rep. Bobby Bright (D-Ala.) win a very conservative seat in 2008. “I would rather have Republicans say the candidate is dodging a question than put on the airwaves the candidate saying ‘Yes, I’m voting for Obama.’ ”

Moderate Republicans did the same in advance of the 2006 election, Democrats note.

But many Democrats have argued that there’s no point running from the man himself.

“Nothing would be phonier than me trying to say Barack Obama is someone I don’t support and who is not my friend,” Sen. Claire McCaskill (D-Mo.) said in January.

“I am a proud friend and supporter of this president,” Virginia Senate candidate Tim Kaine said last week.

They might have a point. It seems like refusing to talk about Obama is the best way to highlight your relationship with Obama.

On Thursday morning, after Republicans gleefully highlighted the debate clip, Barber’s campaign clarified in a statement.

“While Ron does not agree with the President on everything, of course Ron has supported and will support President Obama in the election,” the candidate’s campaign manager said.

A National Republican Congressional Committee spokesman then quickly accused Barber of “trying to hide his agenda.”

In deeply conservative territory, where lawmakers legitimately have few ties to the president, it’s easier to maintain distance. Sen. Joe Manchin and Gov. Earl Ray Tomblin in West Virginia have both hedged on endorsing Obama this cycle, with little fanfare.

In more purple territory, moving too far from the president could depress Democratic turnout. Even in a deep-red district, a Democrat can risk going too far; Mowery thinks Bright may have lost support from his base in 2010 by moving too far from the party.

And sometimes no amount of distance helps. Former representative Gene Taylor (D-Miss.) announced in 2010 that he voted for John McCain in 2008 — a few months before losing his seat to a Republican.

In the end, it depends on the territory. Barber may have made a mistake by trying to duck the Obama question. As the former head of the Democratic National Committee, Kaine would have trouble running if he tried. But Heitkamp, who right now looks competitive with Rep. Rick Berg (R) in a red state, appears to be making the right moves.