Sen. Tim Kaine (D-Va.) campaigns for Virginia gubernatorial nominee Ralph Northam ahead of Tuesday’s elections at Shenandoah University in Winchester, Va., on Nov. 4, 2017. (Photo: Jeff Taylor/The Winchester Star via AP)

Tim Kaine wasted no time in finding a moral in Lt. Gov. Ralph Northam’s stunning win Tuesday.

The Democratic U.S. senator from Virginia had just watched Virginians flock to polling places Tuesday night to elect Northam governor with the most votes for any candidate for the office in the state’s history.

It was clear, especially in northern Virginia, that many Northam voters went to the polls to cast a protest vote against President Trump.

But Kaine, who is up for reelection one year from now and is considered a potential presidential candidate in 2020, seemed to be thinking just as much about what Democrats should be for.

The defeated vice presidential candidate, a former governor himself, roused the crowd at an election-night rally for Northam on the campus of George Mason University and used his short speech to lay down a marker.

“When we make our campaigns about jobs, schools, health care for all, we win,” Kaine said. “I think the nation and the national Democratic Party can learn a lot from us.”

But his speech began and ended on a note of defiance toward Trump.

“Virginia showed the world something tonight. … You said, ‘We’re not for haters. We’re for lovers,’” he said. He concluded by saying that the vote “sent a strong message that Trump-style division — pitting people against people — is not the Virginia way. It is not the American way.”

And that appeared to be a road map to how Kaine will spend the next year talking to voters.

View photos Senator Tim Kaine, a Democrat from Virginia, speaks during a meeting on tax reform and election results at the U.S. Capitol in Washington, D.C., on Nov. 8, 2017. (Photo: Olivier Douliery/Bloomberg via Getty Images) More

He found it important to state the obvious: Many voters find Trump’s Republican Party racially divisive and repugnant, and want to stand against the president. But Kaine also was at pains to lay out — and limit — what he wants Democrats to fight for: economic and practical measures that appeal to a broad swath of voters rather than just to the Democratic base.

“He is worried about being defined by a politics he doesn’t share,” said Matt Bennett, a co-founder of Third Way, a Democratic advocacy group that pushes for a more centrist approach to politics.

In Bennett’s view, Kaine wants to keep Democrats focused on a positive vision that appeals to voters of all backgrounds, rather than getting dragged into a scorched-earth culture war that alienates and suppresses turnout of the moderate voters that Bennett believes made the difference for Northam on Tuesday.

“You better be able to appeal to people who might pull the lever for the other party,” Bennett said. He noted that 42 percent of Virginia voters self-identified as moderates, compared with 31 percent who said they were conservative and 27 percent who reported their political views as liberal.

And here’s why Kaine is worried about being dragged to the left by the exultant progressive wing of his party: He knows that’s exactly what his likely opponent Corey Stewart wants.

Stewart, the flame-throwing immigration hard-liner and Confederate-statue champion, barely lost to Ed Gillespie in the Virginia Republican gubernatorial primary last summer. And now he’s preparing to run against Kaine.

View photos Republican gubernatorial candidate Corey Stewart speaks during a tea party debate at Goochland High School in Goochland, Va., April 22, 2017. (Photo: Steve Helber/AP) More

In the back of the room at the jubilant Northam rally Tuesday night, Kaine adviser Mike Henry predicted that the lesson Stewart would take from Gillespie’s loss would be to run harder to the right. That implies attacks on Kaine on issues that will provoke the left and appeal to fear and resentment among white conservatives.