Here are key moments from the face-off between Republican vice-presidential candidate Mike Pence and Democratic rival Tim Kaine at Longwood University in Farmville, Va. (Sarah Parnass/The Washington Post)

Here are key moments from the face-off between Republican vice-presidential candidate Mike Pence and Democratic rival Tim Kaine at Longwood University in Farmville, Va. (Sarah Parnass/The Washington Post)

In the closing days of the Civil War, Robert E. Lee stopped in this tobacco town to fortify his bedraggled troops. With Union forces in hot pursuit, Lee abandoned the effort, fled town — and surrendered at nearby Appomattox two days later.

Tuesday night, Mike Pence came to Farmville for the vice-presidential debate against Democrat Tim Kaine here with a similar mission: trying to halt the retreat, and revive the troops, after last week’s rout of Donald Trump in the first presidential debate.

Pence came prepared with a sound battle plan: He would avoid discussing Trump to the greatest extent possible. And, in executing his plan, he fared rather better than Lee.

Asked why Americans think Trump is “too erratic,” Pence responded — by talking about Hillary Clinton and her foreign policy.

Sen. Tim Kaine (D-Va.) interrupted Gov. Mike Pence (R-Ind.) repeatedly at the Oct. 4 vice-presidential debate in Farmville, Va. But it didn't always pay off. (Peter Stevenson/The Washington Post)

“I do want to get back to the question,” moderator Elaine Quijano of CBS News coaxed. When Pence continued on about Clinton, she repeated: “In the meantime, the questions. . . .”

Pence finally mentioned that Trump has “extraordinary business acumen” and “employed tens of thousands” — then quickly went back to Clinton’s trustworthiness.

Quijano asked Pence to talk about Trump’s claim that he “brilliantly” used the tax laws. Pence responded — by talking about the Obama administration.

[The vice-presidential debate 2016, or the battle of the dads]

“Governor,” Quijano finally interjected, “with all due respect, the question was about whether it seems fair to you that Mr. Trump said he brilliantly used the laws to pay as little tax as legally possible.”

Stylistically, Pence was strong: calmer than Kaine, interrupting less often, and repeatedly luring Kaine to respond to him. He likely won the debate on points, helped by a canned and sometimes shrill Kaine. But in a broader sense, Pence succeeded by avoiding discussion of Trump and his policies. To the extent he defended Trump at all, he did so by denying Trump had said and done things that Trump had, in fact, said and done.

In that sense, you might consider this the first appearance of Mike Pence’s 2020 presidential campaign. He didn’t turn against his running mate, but he helped himself more than he helped Trump.

1 of 19 Full Screen Autoplay Close Skip Ad × Kaine and Pence face off during the vice-presidential debate in Virginia View Photos The vice-presidential debate at Longwood University in Farmville, Va. Caption The vice-presidential debate at Longwood University in Farmville, Va. Oct. 4, 2016 The vice-presidential nominees — Republican Gov. Mike Pence, right, and Democratic Sen. Tim Kaine — stand before the audience during the vice-presidential debate at Longwood University. Steve Helber/AP Buy Photo Wait 1 second to continue.

Republicans watching Pence’s strong performance Tuesday night had every reason to kick themselves. Had Republicans chosen a mainstream conservative like Pence — or Jeb Bush, Marco Rubio, John Kasich or a number of others who offered their services in the primary campaign — there is every reason to believe that candidate would be leading Clinton, who has proved to be a weak general election candidate in this year of change.

Pence hasn’t tweeted about a sex tape at 5 a.m. He hasn’t shamed a woman publicly for gaining weight. He didn’t mock a political opponent’s pneumonia-induced stumble, nor claim that his opponent is “crazy” and unfaithful to her husband, nor suggest that returning soldiers with PTSD are weak.

Trump did all that— in the space of a single week since his first-debate flop. And Pence, at the start, was disoriented. He began by thanking “Norwood University for their wonderful hospitality.” He was, in fact, at Longwood University.

In the few months since he accepted Trump’s tap, Pence has become the Servpro of the 2016 election, constantly cleaning up after Trump when the presidential nominee, say, attacks a Gold Star family.

A running mate’s usual task in a debate, and in a presidential campaign generally, is to assure the public that he or she could take over if the unthinkable occurs. In Pence’s case, there’s no question about his fitness to serve. The question is whether Trump is prepared to serve.

[Mike Pence just revealed the core weakness of Trump’s candidacy]

That Pence could be a heartbeat from the presidency makes pulse rates calm. That Trump could be president causes tachycardia.

Kaine, therefore, did all he could to keep the focus on Trump: “The thought of Donald Trump as commander in chief scares us to death. . . . Donald Trump always puts himself first. . . . He has pursued the discredited and really outrageous lie that President Obama wasn’t born in the United States.”

But Pence had a simple parry: Noun, verb, Hillary Clinton. As Kaine hectored him to defend Trump’s “insult-driven” talk of women as slobs and pigs and Mexicans as rapists and criminals, Pence volleyed:

“That’s small potatoes compared to Hillary Clinton calling half of Donald Trump’s supporters a basket of deplorables.”

It didn’t much matter what the topic was — North Korea? Police and race? — Pence, deftly, kept turning the conversation back to Clinton. This, occasional jabs at the Obama administration and at Kaine’s own record, and Pence’s Trumpian willingness to assert falsehoods with great conviction, kept the Democrat on his heels.

Kaine repeatedly — by his own count, six times — challenged Pence to defend Trump on one point or another.

“In all six cases, he’s refused,” Kaine complained toward the end of the debate.

“Don’t put words in my mouth,” Pence protested. “I’m very, very happy to defend Donald Trump.”

Ah, but sparingly: Not enough to appear overtly disloyal, but not so much that it will harm his future presidential prospects after Trump’s Appomattox.

Twitter: @Milbank

Read more from Dana Milbank’s archive, follow him on Twitter or subscribe to his updates on Facebook.