WASHINGTON — For years, the phrase rolled off his tongue in times of strife, a rallying cry to his predominantly white base.

So it was unsurprising when, on the day after his supporters stormed the Capitol, he uttered those familiar three words just 20 seconds into a video filmed from the White House.

“America is, and must always be,” Donald Trump declared, “a nation of law and order.”

He teed up the language as he often does, steadying his cadence before the big reveal of the first word — law — and letting it linger for half a beat before unfurling the rest: and order.

Yet Mr. Trump’s face, expressionless as it was, appeared to register a different truth: That in the aftermath of the attack, where his supporters overwhelmed the police and created anarchy, his favored mantra had become all but meaningless.

Ever since descending the gilded escalator of Trump Tower to announce his presidential bid in 2015, Mr. Trump has tethered his success to the politics of law and order, stoking fears and then positioning himself as the only person capable of confronting them. As for what — or whom — Americans should fear, Mr. Trump virtually always targeted people of color and people who protested for their rights: Mexicans, migrants from Central America, Black Lives Matter activists, the diverse array of protesters in major cities last summer.

But this month, it was a largely white mob trawling the Capitol grounds with Trump banners and zip ties, and killing a police officer after striking him in the head with a fire extinguisher. And yet the president did not preside over a tear-gas-fogged show of force, as he had during a protest for racial justice before the White House last summer. Instead, he praised these supporters on the evening of the riot — “you’re very special,” he assured them, “we love you” — before trotting out the “law and order” comment the next day under pressure from advisers.

If Mr. Trump spent much of his presidency casting the G.O.P. as the party of law and order, he is concluding it by clarifying just who, in his view — and in his base’s view, the law was designed to order. It’s the Black Lives Matter protesters who are confronted and arrested by the police in Mr. Trump’s law-and-order America; the white mob, on the other hand, can expect officers who pause for selfies.

“This ‘Blue Lives Matter’ stuff was just a code word for race that they were using,” said Stuart Stevens, a longtime Republican strategist. “‘Law and order’? Here you have a police officer murdered on Capitol grounds, and the White House doesn’t even acknowledge it. It’s incredible.”

Republicans saw “law and order” slipping away from them long before last week. Even as Mr. Trump and much of his party put crime and public safety at the center of their campaigns, few voters were ultimately moved by it. In key states like Arizona, many white suburban women found the Trump campaign’s narrative — that a Biden administration would overhaul the nation’s law enforcement and usher in an unprecedented crime wave — more off-putting than resonant.

That’s not to say that no Republicans found success in staking their campaigns on law and order. In New York’s 11th Congressional District, Nicole Malliotakis celebrated her sizable victory over Max Rose, the Democratic incumbent, by declaring that voters had “sent a very clear message that they want law and order.” Ms. Malliotakis had spent much of her campaign linking Mr. Rose to the Black Lives Matter movement.

Yet if some Republicans had succeeded in positioning their party as the one more committed to law and order, Mr. Trump, in refusing to accept the results of the election and encouraging his supporters to “fight back,” has seemed committed in proving them wrong.

Advertising buys in 2020 tell the story of when Republicans, from Mr. Trump to then-Senator Kelly Loeffler of Georgia, believed a law-and-order message was most poised to resonate with voters. From early June to the end of July, the amount of money spent on ads featuring the literal phrase “law and order” jumped nearly 93,000 percent, according to numbers compiled by AdImpact.

It was during this time that racial justice protests erupted across the country, some of which, in cities like Atlanta, Ga., and Portland, Ore., devolved into rioting.

Mr. Trump endeavored to make the Black Lives Matter movement synonymous with the unrest, and paint Joseph R. Biden as a candidate too meek to quell them, too likely to accede the rioters’ demands to defund the police. Yet by the time of the election, of all the concerns animating even Republican voters, crime and safety did not crack the top five.

The message sputtered in no small part because many Americans largely supported the goals of the Black Lives Matter protesters, according to polling, a stark contrast to the 1960s and ’70s, when surveys showed that Americans were less likely to view police brutality as a problem and more afraid of demonstrations and riots spilling into their community.

Richard Nixon’s elevation of the phrase during that time to a “term of art,” as Theodore Johnson, a senior fellow at the Brennan Center for Justice, put it, was not just in speaking to the anxieties sweeping the nation at the time, but in knowing what to leave unsaid.

“In the ’60s, there was a lot for people to be worried about,” Dr. Johnson said. Political assassinations, hundreds of riots, high crime rates — people genuinely did want to do something about crime and feel safer and more secure in their homes and communities.”

“But who communities needed to be safe from was always sort of the undercurrent of law and order,” he continued. “It wasn’t just that crimes were up, it was who the criminals were.”

Capitol Riot Fallout

From Riot to Impeachment

The riot inside the U.S. Capitol on Wednesday, Jan. 6, followed a rally at which President Trump made an inflammatory speech to his supporters, questioning the results of the election. Here’s a look at what happened and the ongoing fallout: