WASHINGTON (AP) — Gary Johnson of the Libertarian Party and Virgil Goode of the Constitution Party are on quixotic runs for the presidency. While they are long shots, they conceivably stand a chance at influencing the election.

Until recently both were Republican officeholders — Johnson as a two-term governor of New Mexico and Goode as a congressman from Virginia. With their ability to draw at least a sliver of the electorate, President Barack Obama's political team sees them as potentially unwilling allies who could steal votes from rival Mitt Romney and help the president to victory in a few tightly contested states.

Goode served six terms in the House and is gathering signatures to appear on the ballot in his home state. He's already on the ballot in more than a dozen other states with an anti-immigration, pro-term limit platform he hopes makes a dent with the electorate. It's not likely to be much of a dent, but could be enough in Virginia for Obama campaign officials to take close notice.

Johnson, who ran for president as a Republican last year before dropping out ahead of the primaries, is seen as a potential factor in Western states, particularly in closely fought Colorado.

Neither of these candidates is considered enough of a national threat to draw comparisons to Ross Perot, whose independent campaign in 1992 attracted nearly 19 percent of the vote and whom President George H.W. Bush still blames for costing him his re-election.

Instead, Democrats see Goode and Johnson as this year's Ralph Nader, whom they still blame for Al Gore's loss to George W. Bush in 2000. Nader's liberal Green Party candidacy only attracted 2.7 percent of the national vote, but in decisive Florida, his total was greater than the 537 votes that separated Bush from Gore.

Despite that history, in most modern elections, third-party candidates haven't swayed the results, and even those who poll strongly early in the campaign eventually fizzle.

Still, in a national contest like this year's in which Obama holds slight leads or is running virtually even with Romney in key battleground states, even a sliver of the vote in a crucial state could determine the outcome. Obama's team has scenarios whereby Obama can win states like Virginia and Colorado with less than 50 percent of the vote thanks to an assist from Goode and Johnson, respectively.

That third-party candidates have become a consideration in Obama's camp illustrates one of the president's persistent challenges and his potential weakness — his inability to get above 50 percent in states he carried with some comfort in 2008.

Of all the states in play, Virginia looms among the most important. Campaigning in the state recently, Obama repeatedly declared that if he wins Virginia he would win the election.

Virginia is even more of a keystone in Romney's strategy — one of three formerly reliable Republican presidential states that went for Obama in 2008.

Goode, who served in Congress as a conservative Democrat and then as a Republican, is running a campaign based on stopping illegal immigration and on imposing a moratorium on nearly all green cards for legal immigrants until the U.S. economy improves and unemployment falls below 5 percent. It's a stance that could attract a small number of conservatives who would otherwise vote for Romney.

"If Virgil Goode gets on the ballot in Virginia, that is going to make it very tough on Romney," said Democratic strategist Joe Trippi, a veteran of presidential campaigns. It's difficult to imagine Romney getting the 270 electoral votes he needs to win if he doesn't carry Virginia, Trippi said, adding that Goode "would be potentially crippling to Romney."

Romney's team downplays any damage Goode or Johnson could cause to their candidate. They argue that the passion to defeat Obama among Romney supporters will outweigh any desire to vote for someone else.

"People on the right side of the spectrum are so intent on beating this president that they will see a vote for a Gary Johnson or a Virgil Goode as nothing more than a vote to re-elect Barack Obama," Romney political director Rich Beeson said.

Moreover, Beeson said, Obama might be vulnerable among disgruntled liberals who might be attracted to Johnson's libertarian social views.

"I think he's going to lose some on the left and at the end of the day you assume that that's a wash and it's back to being a one-to-one race," Beeson said. "Right now it is an interesting story line, but as we get closer to the election, I think these things tend to sort of fall away and you have the bulk of the electorate focused on the two primary party candidates."

A recent Pew Research Center poll found that 34 percent of Romney voters support him strongly whereas 64 percent of Obama supporters say they back him strongly. That could mean Romney voters could switch allegiance to a third-party candidate more easily.

Obama advisers say they are not doing anything to help either Goode or Johnson secure positions on the ballots of key states and they don't plan to do anything to assist their candidacies.

Johnson has encountered a challenge in Michigan from the state's Republican attorney general, who has declared him ineligible to appear on that state's ballot. Johnson has an innovative "Plan B": using another Gary E. Johnson who has volunteered to have his name placed on the Libertarian Party ticket in Michigan.

Goode needs 10,000 signatures to qualify for the Virginia ballot. He has collected 14,000 signatures and is gathering more to pad his number by the state's Aug. 24 deadline. He says no Republican officials have talked to him about the race, let alone sought to discourage his presence on the Virginia ballot.

Goode and Johnson believe that in the end they will pull votes from both sides and that they will attract independent voters who have no interest in voting for either major party candidate.

Indeed, a Pew Research Center poll in in June found that majorities of independent voters view both parties unfavorably.

"We hope to get votes from people who are dissatisfied with both," Goode said, noting that he has received encouragement from conservative Democrats as well as Republicans.

Johnson says his effect on the race depends on the state. "When you look at the polling, in New Mexico, for example, I take more votes away from Obama," he said. "In North Carolina I take more votes away from Romney. I think that's a mixed bag."

Johnson, for one, doesn't mind the attention that comes with being seen as a potential spoiler.

"If I were to get tagged with a spoiler role in this, that would be terrific," he said. "That would bring a lot of focus to what I'm doing."


Follow Jim Kuhnhenn on Twitter at http://twitter.com/jkuhnhenn