WASHINGTON — President Donald Trump has put white nationalists on a roller coaster ride in the closing days before the midterm elections.

Eight days ago, Trump declared himself a "nationalist" at a campaign rally in Houston. Then, after 11 worshipers were slaughtered at a Pittsburgh synagogue on Saturday, he condemned "the scourge of anti-Semitism." And in a snippet of an interview with "Axios on HBO" released Monday, amid a broader push to make his hard-line immigration stance a focal point of the election in a week, he announced a proposal to end "birthright citizenship" by executive order.

The dark corners of the white nationalist movement take different views of Trump: Some on the far right are ardent supporters who see him as a fellow traveler, while others believe that the president has failed to live up to his promises on immigration and has been too supportive of Israel and too close to Jewish advisers, including members of his own family.

"Trump is a globalist, not a nationalist," Robert Bowers, the man charged in the Pittsburgh massacre wrote in a social media post several days after Trump's Houston speech and a couple of days before the shootings. His other posts included suggestions that Trump was too close to Jewish people.

Trump responded quizzically last week when he was asked whether he was sending a message to white nationalists that he is one of them.

"I never even heard that, I cannot imagine that," the president said. "You mean — I say I'm a nationalist? No, I never heard that theory about being a nationalist, I've heard 'em all. But I'm somebody that loves our country, when I say a nationalist."

White House deputy press secretary Raj Shah was asked by NBC whether Trump viewed himself as a white nationalist. "Of course not," he responded.

And yet many white nationalists responded with glee at what they saw as a coded acceptance of their views in his Houston speech.

"Aw, shucks. It would be real nice if he said 'I'm a White Nationalist !'" one poster going by the handle VikingCelt wrote, with a winking emoji, on the white supremacist website Stormfront. "(I know it won't happen but we can dream, can we?)"

These are the remarks Trump made in Houston: "You know, they have a word. It sort of became old-fashioned. It's called a 'nationalist.' And I say, really, we're not supposed to use that word." But then he did: "You know what I am? I'm a nationalist, OK? I'm a nationalist."

It sounded as though he understood the connotations of the word.

Kevin M. Kruse, a history professor at Princeton who has studied race and religion in America, said that when Trump calls himself a "nationalist," white nationalists "hear the 'white' part" even if it's unsaid.

"It’s always hard to trace intent. I would assume he knows how this resonates," Kruse said. "Whether or not he meant it, it's irresponsible not to understand how it's going to be received."

White nationalists also expressed excitement Tuesday about Trump's plan to use an executive order to end "birthright citizenship," the automatic grant of citizen status to anyone born in the United States.

"Master race president remains the master of races," Andrew Anglin wrote at the Daily Stormer, a white supremacist website.

Yet there was also deep skepticism about whether Trump could actually fulfill his promise, because many legal scholars believe that only a constitutional amendment — or at the very least a law — could alter birthright citizenship.

And some white nationalists saw Trump's words the way they were received by many on the political left — as a shameless political play in the final days before voters go to the polls.

A Stormfront forum member wrote, "Trump: What can I tell those suckers to gain some more support for the midterms? Stephen Miller: tell those gullible goyim you're gonna end birthright citizenship!"

Miller, Trump's chief White House adviser on immigration policy, is Jewish. "Goyim" is a Yiddish word for non-Jews and it can be considered derogatory in certain usages.

Trump has insisted that his use of "nationalist" is simply a contrast with "globalists," whom he defines as caring more about the rest of the world than about the United States.

But for anti-Semitic groups, the term "globalist" is often used as a shorthand for conspiracy theories about a cabal of Jews controlling the world and its major institutions.

That's what Bowers, the man charged in the Pittsburgh shooting, was referring to in his post on the social media site Gab.

In the wake of the murders and the delivery of mail bombs to prominent Trump critics, including George Soros, a Democratic donor and activist who is often the central target of anti-Semitic conspiracy theories, Trump has sought at times to affirmatively distance himself from bigotry.

"The scourge of anti-Semitism cannot be ignored, cannot be tolerated, and we can't allow it to continue," he said at a campaign rally in rural Illinois Saturday night. "It must be confronted and condemned everywhere it rears its very ugly head."

That's hardly the kind of talk that will win him the allegiance of people who believe that America should be a nation only for white Christians.

But when some on the hard right are most angry that he hasn't done even more to stop illegal immigration, the birthright citizenship plan has the potential to mobilize voters on behalf of candidates he supports.

It comes amid a broader push to demonstrate that he is taking action on illegal immigration that includes sending 5,200 U.S. troops to the southern border and his announced intent to set up tent cities to house undocumented immigrants if members of the caravan come across the border illegally.

Not all opponents of illegal immigration are white nationalists, but many white nationalists are among the most vocal and vitriolic critics of undocumented immigrants and of what they see as Trump's inability to fully control the southern border.

Whether or not he agrees with their worldview — and White House press secretary Sarah Sanders said Monday that Trump has "denounced racism, hatred, and bigotry in all forms" — he needs them to vote in the midterms.

The question is whether the last week has made that more or less likely.