President Trump speaks to reporters about protests in Charlottesville after his statement on the infrastructure discussion in the lobby at Trump Tower in New York on Aug. 15, 2017. (Jim Watson/AFP/Getty Images)

For two long days, President Trump’s responses to the violent events in Charlottesville has been recorded as a disaster. News shows and editorial boards have condemned him. Chatter of replacing him on the 2020 Republican ticket has picked up again. Two corporate advisory councils shuttered after a steady exodus of their members — all of them citing Trump’s insistence that a murderous Saturday in Charlottesville was the fault of “both sides,” not specifically of white supremacists who organized a “Unite the Right” rally that turned deadly.

Trump has been here before. The president’s ability to dive into controversies and come safely out the other end has given pause to critics, right and left, who wonder how the debate over racism will play out. Trump’s Thursday tweets, which attempted to shift the discussion to the wisdom of keeping Confederate monuments in place, appeared to put him on firmer political ground. Comments by political adviser Stephen K. Bannon suggested that the White House was betting on protesters to overreact, and shift the discussion further.

“The race-identity politics of the left wants to say it’s all racist,” Bannon told the New York Times. “Just give me more. Tear down more statues. Say the revolution is coming. I can’t get enough of it.”

Bannon’s rhetoric evoked events and trends that preceded his hiring by the Trump campaign, one year ago. On the right, Trump’s political opponents have seen him benefit tremendously in moments of protest and conflict, when blame could be shifted to a violent left. And on the left, analysts wonder whether a president who proved Republican orthodoxy wrong, maximizing white voters instead of offering policy gains to nonwhites, had lucked into another coup.

“I’m not sure that he has great political skills, so his calculations are hard to figure,” said Jason McDaniel, a political scientist who co-authored a report this year on the shifting white vote. “He doesn’t like to back down, and he identifies with groups that are more likely to hold these kinds of negative views. We saw during the election that people who identify with white racial identity were more likely to support him.”

Evidence the story will help Trump comes from a small number of moments in the 2016 election. The defining moment came on March 11, 2016, when Trump was scheduled to appear at the University of Illinois in Chicago. Protesters swarmed the room where he was supposed to speak, and the event was canceled, with images of cheering left-wing activists and brawling Trump supporters covered live on television.

In public, Republicans condemned Trump. “If he’s our nominee, this is what the Republican Party’s going to be defined by,” said Sen. Marco Rubio (R-Fla.), who at that point was fighting unsuccessfully to win his home state’s primary.

“I think a campaign bears responsibility for creating an environment,” said Sen. Ted Cruz (R-Tex.). “When the candidate urges supporters to engage in physical violence, to punch people in the face, the predictable consequence of that is that it escalate.”

Four days later, Trump won the Florida, Illinois, Missouri and North Carolina primaries, knocking Rubio out of the race. According to strategists with knowledge of internal polling, the mess in Chicago did not hurt Trump. It moved his numbers up, helping secure razor-thin victories in Missouri and North Carolina over Cruz — in retrospect, stopping the last chance Republican leaders had of stopping the front-runner.

The Trump campaign benefited from a reaction other Republicans did not understand. Rubio et al hoped voters would see Trump as a shambling agent of chaos, making it harder for the party to unite and win. To most Republican voters, the chaos was not Trump’s fault — it was the fault of an angry (and, on TV, notably diverse) left. That interpretation became permanent in October, when Trump-backing right-wing video journalist James O’Keefe caught Democratic operatives on camera, bragging (with little evidence but their egos) that they had organized the “riot” against Trump.

But Democrats misread Trump in a more fundamental way. Since at least 2001, after George W. Bush lost the popular vote but won the presidency, Republicans had worked to appeal to more nonwhite voters, softening their stance on immigration and electing nonwhite representatives. In 2012, famously, Mitt Romney won the same share of the white vote as Ronald Reagan had in 1984. What was good for a landslide in the Reagan decade was good for 47 percent of the vote against Barack Obama.

Trump’s eventual strategy, as was pointed out after the election — after a good deal of smug analysis about the diversity of an “emerging electorate” — was successful because it won more white voters. Thanks in large part to declining nonwhite turnout, Trump did slightly better among nonwhite voters than Obama’s two opponents. (He did worse than any other Republican since the 1960s.)

But in key Midwestern states, he did far better than any post-Reagan Republican with white voters. In Michigan, Obama had lost the white vote by only 11 points. Clinton lost it by 21 points. In Ohio, where Obama had lost white voters by 16 points, Clinton lost them by 28. In Pennsylvania, Clinton only underperformed Obama by one point among white voters, but the white share of the electorate rose from 78 percent to 81 percent.

This was the sort of liberating breakthrough some “paleo-conservatives” had been pining for since the end of Reagan’s presidency. In an interview last year with The Washington Post, three-time presidential candidate Pat Buchanan put it more starkly — if white voters in the Midwest voted like white voters in the Deep South, Democrats could not win an election. In a series of essays, starting in 2000, the writer Steve Sailer accurately predicted a white voter surge in the right states could elect someone like Trump.

“An increase in white working class share and turnout gives him such a margin of error with other groups makes me certain that a Trump presidency is a real possibility,” Sailer wrote in 2015.

That increase was hard for many Democrats to see. Only after the election did some of them begin asking whether Trump had successfully exploited “identity politics” to turn some voters who had sat out previous elections, or even cast hopeful votes for Obama, into nationalists.

Post-election issue polls found several racial questions, rarely explored in the campaign, strongly animated some Trump voters. In a Washington Post-Kaiser Family Foundation poll this year, 44 percent of Trump voters said “whites losing out due to preferences for blacks and Hispanics” remained a problem, bigger than the problem of nonwhites losing out themselves. In a 2016 American National Election Study poll, 28 percent of white Trump voters said blacks would be as well off as whites if they tried harder; just 5 percent of people who thought so backed Hillary Clinton.

And during the election itself, Clinton’s campaign tried and largely failed to make an issue of Trump’s focus on white identity politics. Several times, she said some Trump supporters could fit into a “basket of deplorables.” Once, she said “half” of his supporters could — a gaffe that became a rallying cry for Trump fans.

In an email interview, former Clinton spokesman Brian Fallon argued that the media repeatedly moved on too quickly from arguments about Trump’s appeals to racism. Clinton had tried to define the kind of campaign Trump was running in a speech that attacked Bannon’s endorsement of the “alt-right.” It made a splash and did not move poll numbers.

“On the very same day we gave the alt-right speech, Trump responded in his usual way: hurling the same charge back at the accuser,” Fallon said. “On this particular occasion, he called Hillary a ‘bigot.’ It was without evidence and not backed up by anything approaching the very detailed case Clinton made in her Reno speech. But he picked a fiery word, and so most of the coverage just devolved into ‘Trump, Clinton trade barbs on racism’ and the accompanying commentary was about how the campaign rhetoric was reaching new depths of nastiness.”

Since then, Trump has won an election, helped his party avert losses in some special elections, but achieved little of what he promised on the campaign trail. He has, however, shifted domestic policy priorities on race and immigration in ways that have activated both his base and the Democrats. His favorability numbers have sunk — but in the states that handed him the presidency, they’ve sunk by less.

A Gallup survey of all 50 states, released last month, found Trump with higher support in Iowa and Ohio, two states that have been closely contested by presidential candidates since the 1980s, than in several diverse states that have been safely Republican. In Ohio, his approval rating was 47 percent — it was lower in Arizona, Georgia and Texas, where large and growing nonwhite populations strongly oppose Trump. (It was in the 30s in Virginia, which goes some way toward explaining why the state’s Democratic nominee for governor, Ralph Northam, has confidently endorsed Charlottesville’s decision to remove the Robert E. Lee statue that inspired “Unite the Right.”)

The Confederate statue controversy would not appear to be relevant in Midwestern states, where there are few monuments to tear down. But it was in the Midwest, in Chicago, where Trump first showed the base-motivating power of a “law and order” pitch being dramatized by left-wing protesters.

Scott Clement contributed reporting.