Former Klansman David Duke, center, before a debate for Senate candidates at Dillard University in New Orleans on Nov. 2. (Gerald Herbert/AP)

The weekend before the election, David Duke was feeling good. He was confident that Donald Trump, whom he’d endorsed despite the nominee’s frequent protests, would win the presidency. He was confident that his own race for the Senate would break his way, too, despite a late start and media coverage that treated him like a curiosity.

“I’ve always got three or four times what I’ve got in any poll,” the former Klansman said. “It happened last time I ran for Congress, in 1999.”

But Trump, who was polling strongly in states across the country Tuesday night and who easily won Louisiana, provided no lift for Duke, undermining the suggestion that Trump’s candidacy, with its appeal to white voters, could be a political boon for the far right.

Duke had not won office since George H.W. Bush was president. He had never risen higher than the state legislature — his runs for U.S. Senate and governor drew national attention and ended in landslide defeats. And Duke’s latest bid for the Senate was equally unpopular, according to early returns, which had him at about 3 percent.

From the first day of his presidential campaign, with his warning about Mexico “not sending their best” immigrants across the border, Trump echoed some of the rhetoric that white nationalists had pitched for decades.

He never made the strategy explicit. He rejected accusations that his was a racial appeal and denounced Duke specifically, with greater intensity every time he was brought up. In the final week of the campaign, Trump’s son Eric said Duke deserved a “bullet,” and conservative commentator Ann Coulter, who had backed Trump from the outset, joked that Duke existed only when Democrats needed him.

But the strategy Trump used to come closer to the presidency than any poll had predicted, and any Republican strategist thought possible, was still one people like Duke had dreamed of.

White nationalists had argued that the Republican Party should double down on whites instead of trying to appeal to minorities — indeed, that it had only a few years to do so before being overwhelmed by nonwhites. Jared Taylor, the editor of American Renaissance, wrote column after column, and was ostracized from conference after conference, for saying so.

But voters in Louisiana drew a sharp distinction between Trump and Duke. They embraced the presidential candidate while rejecting Duke’s efforts to ride his coattails. The vote could ease concerns that Trump would mainstream some of the white-supremacist movements or ideas that have long existed on the far edges of American politics.

In the early 1980s, when nonwhites made up a far smaller proportion of the electorate, Duke imagined an America that could officially segregate them: Cubans around Miami, blacks in a stretch of the old South.

“The exploding numbers of nonwhites are slowly wrapping formerly white nations in a dark human cocoon,” Duke wrote in 1983. “Should a butterfly emerge, or a beast that has haunted the ruins of every great white civilization that submitted to invasion by immigration and racial miscegenation?”

When he entered politics, Duke’s tone softened. As a vote-winning politician, he proposed drug tests for welfare recipients, inveighed against Japan taking American jobs and attacked affirmative action.

When he went statewide, however, he faltered. Duke’s simple solutions were punctured by journalists who wanted to see how his philosophy could apply to people’s lives. And the process repeated itself Tuesday.

After giving out the address of his election night party, at his home north of Lake Ponchartrain, Duke changed course. The party would be limited to family and friends, as the Senate race was falling short of expectations.

But Trump was more than making up for that.

“This is a historic moment,” Duke said. “If he goes on to win this race, it is a vital victory for taking America back.”