Jim Webb. (Patrick Semansky/AP)

Former senator Jim Webb (Va.) never got any traction in the Democratic presidential primary. And by the end, his campaign was more of a punchline than a real factor — better known for Webb recalling a man he apparently killed in Vietnam than anything else.

But if Webb proceeds with an independent run for president next year, as he has said he might, he appears likely to shake up the campaign in the state where he is known best — a state that just happens to be among the most vital swing states.

Webb polled between 13 percent and 19 percent among registered Virginia voters in four three-way match-ups against leading Democratic and Republican candidates for president, according to a new survey sponsored by the University of Mary Washington’s Center for Leadership and Media Studies. Although it doesn’t appear that Webb could win the state, he could certainly prove to be a factor that both major parties have to contend with — and could swing the state for one side or another, even if he takes less than double digits.

Webb, who served as a Democratic senator from 2007 to 2013, received the support of 19 percent of the state’s registered voters in a possible contest pitting him against Sen. Bernie Sanders (Vt.) and businessman Donald Trump, who received the support of 36 percent and 35 percent, respectively.

In a hypothetical contest including former secretary of state Hillary Clinton and Trump, Webb received 16 percent support, as compared with 41 percent for Clinton and 33 percent for Trump. In this match-up, involving the two parties’ front-runners, 55 percent of registered voters in Virginia who favored Webb said they were independents, 25 percent said they were Republicans and 16 percent described themselves as Democrats.

The survey revealed that current voter support for an independent presidential bid by Webb is comparable to the 13.6 percent support that third-party presidential candidate Ross Perot received in Virginia in the 1992 presidential election. Support for Webb currently remains below the 23.6 percent of Virginians who voted for Alabama’s George Wallace in the 1968 presidential campaign — the high-water mark of Election Day support for an independent presidential candidate in Virginia over the past century.

Webb’s worst performance in the four possible 2016 candidate contests examined in the survey came in a possible match-up involving Ben Carson and Clinton, who received 41 percent and 38 percent support, respectively, among registered Virginia voters, while Webb stood at 13 percent. In the fourth possible match-up surveyed, 39 percent of registered voters supported Carson in a match-up with Sanders and Webb, who received 35 percent and 17 percent support, respectively.

Webb’s support in Virginia suggests considerable frustration in the state with the front-runners of both parties. It also demonstrates the limitations of endorsements by the state’s top Democratic officeholders — including Gov. Terry McAuliffe and Sens. Mark Warner and Tim Kaine — all of whom are backing Clinton.

Virginia has been among the states most closely contested over the past two presidential election cycles. Its 13 electoral votes — along with those of the large “purple” states of Florida, Ohio and North Carolina — are likely to be pivotal to the presidential prospects of both parties next year. No state more closely mirrored the national popular vote in 2012 than Virginia.

The telephone survey of 1,006 adult Virginians, including 814 registered voters, was conducted by Princeton Survey Research Associates International (PSRAI) from Nov. 4 to Nov. 9.  Webb did about as well among all Virginians surveyed and among those considered likely to vote in the 2016 presidential contest as he did among registered voters. Statistical results are weighted to correct known demographic discrepancies. The margin of sampling error for the complete set of weighted data is plus or minus 3.5 percentage points (plus or minus 3.9 percentage points for registered voters).

Among the registered voters in the survey, 35 percent said they were Democrats, 33 percent said they were Republicans and 28 percent said they were independent.

A Webb independent campaign would not be the strongest possible independent campaign in the Old Dominion, however. If former Florida governor Jeb Bush were the Republican nominee and if a frustrated Trump launched an independent presidential campaign, 42 percent of registered Virginia voters in the survey said they would support Clinton, 27 percent would back Trump and 22 percent would favor Bush. Other polls have shown a Trump independent bid performing similarly, and Trump recently left open the possibility of pursuing one if GOP leaders mistreat him during the primary process.

Stephen J. Farnsworth is professor of political science at the University of Mary Washington and director of the university’s Center for Leadership and Media Studies.