When a van plowed into pedestrians in Barcelona last week, President Trump didn’t wait for investigators to determine who the attackers were. Within minutes of the first reports, he tweeted: “The United States condemns the terror attack in Barcelona, Spain, and will do whatever is necessary to help.”


But when a car rammed into a crowd in Charlottesville, Va., five days earlier, Trump decried violence “on many sides” and explained that he needed to wait for the facts to come in. Later, under pressure, he read a written statement condemning racism but never used the word “terror” at all.


He found it easy to identify Islamic terrorism in Spain, but hard to condemn white supremacist terrorism in Virginia.


The president turned out to be right about Barcelona. But he was wrong about Charlottesville, and he has managed to make himself more wrong at almost every turn. At the end of the week, Trump tried to change the subject from extremist violence to the slightly less painful question of what to do with Civil War monuments. But that only made things worse.


“Sad to see the history and culture of our great country being ripped apart with the removal of our beautiful statues and monuments,” he tweeted. “So foolish! Also, the beauty that is being taken out of our cities, towns and parks will be greatly missed and never able to be comparably replaced!”


Let’s leave aside the aesthetic value of post-Civil War statues, few of which had been held up as artistic masterpieces before. Trump simply isn’t doing what a normal president would do. An American town was convulsed by murderous violence, and extremist groups — yes, on both sides — are spoiling for a rematch. White supremacists have planned Charlottesville-style rallies for Boston; Lexington, Ky.; and Richmond, Va.; it’s a reasonable bet that the antifa — anti-fascist — left will want to show up too.


A normal president — that is, one who observes traditional norms — would try to calm the waters. He’d suggest a cooling-off period. If the statues were really the root of the problem, he might propose letting city councils and state legislatures decide what their citizens want, and limit the federal role to helping keep the peace.


Instead, he’s stoking the fires of rage and jumping in, as president of the United States, emphatically on one side. Note well the words Trump used: “the history and culture of our great country, being ripped apart.” That’s the language of one side in this debate. There may be a legitimate argument for that view, although I happen to disagree; I believe American culture is robust enough to withstand the removal of divisive public monuments. But the real problem is that the cleaned-up language of “Southern heritage” isn’t neutral. It was co-opted long ago by the white supremacists and neo-Nazis who organized the march in Charlottesville.


And now it’s been adopted by the president, too.


It’s not hard to figure out the rationale for Trump’s situational morality. He’s making sure white nationalists, a small but zealous part of his electoral base, hear clearly that he’s with them. “He’s not even bothering to use a dog whistle any more,” an eminent Republican who has advised Trump told me. “He’s whistling right out loud.”


Stephen K. Bannon, the president’s chief strategist until last week, told the New York Times that Trump should actively provoke a culture war for electoral gain.


“Tear down more statues. Say the revolution is coming. I can’t get enough of it,” Bannon said. He may be gone from the White House, but his message isn’t forgotten.


Trump wasn’t always this way. In 2015, he called on South Carolina to take the Confederate flag down from its State House and “put it in a museum.” Back then, at the beginning of his presidential campaign, he took pains to prove that he wasn’t a racist or an anti-Semite.


Now that his job approval rating is mired below 40 percent, he seems more intent on maintaining the support of a small and shrinking slice of the American electorate whose views he publicly spurned only two years ago.


That’s why so many Republicans have been furious at this president, whose allegiance to their party and its tenets has always been tenuous. Many of them consider his Bannonite position on white supremacists cynical and immoral; almost all consider it politically unwise.


Much of the punditry clucked last week over which prominent Republicans dared to criticize Trump by name, and which (including Senate leader Mitch McConnell and House Speaker Paul D. Ryan) did not.


Far more significant was the less-noticed fact that almost no Republicans spoke out in defense of their party’s president. Fox News Channel’s Bret Baier said his producers spent a full day searching for a GOP senator who would stand up for Trump. There weren’t any.


“They are running away from him,” the GOP advisor said. “They are going to try to create some distance. They don’t want Trump to become their brand.”


But that’s hard to do. Most American voters consider the president the chief spokesman for his party. Trump, angry and erratic, is redefining the image of the GOP, whether other Republicans like it or not.


Doyle McManus is a columnist for the Los Angeles Times. Readers may send him email at doyle.mcmanus@latimes.com.