The company said Mr. Trump’s post violated its rules against glorifying violence, and it prevented users from viewing the tweet without reading a brief notice, the first time it has restricted one of the president’s messages in this way. Twitter also blocked users from liking or replying to Mr. Trump’s post, though they were still allowed to retweet it if they added a comment of their own.
But Twitter did not take the tweet down, saying it was in the public’s interest that the message remain accessible.
In the tweet, posted early Friday morning, Mr. Trump called the protesters “thugs” and said he had told Minnesota’s governor that the military was “with him all the way.”
“Any difficulty and we will assume control but, when the looting starts, the shooting starts,” the president wrote. “Thank you!”
Twitter said it had decided to restrict the tweet “based on the historical context of the last line, its connection to violence, and the risk it could inspire similar actions today.”
The company’s decision comes a day after Mr. Trump signed an executive order that seeks to limit the legal protections shielding social media companies from liability for the content posted on their platforms. The president had fulminated over Twitter’s decision earlier this week to add fact-checking labels for the first time to two of his tweets. In response, he accused Twitter of stifling speech and said that he would end the interference.
Hours after the warning label was added to Mr. Trump’s Friday tweet, he posted another that accused Twitter of targeting “Republicans, Conservatives & the President of the United States.”
Mr. Trump’s tweet about the Minneapolis protests echoed a comment by Walter E. Headley, the Miami police chief who attracted national attention in the late 1960s for using shotguns, dogs and a heavy-handed “stop-and-frisk” policy to fight crime in the city’s black neighborhoods.
Mr. Headley announced a “get tough” campaign in a December 1967 news conference that prompted anger among black leaders, The New York Times reported at the time.
“We haven’t had any serious problems with civil uprising and looting,” he said, “because I’ve let the word filter down that when the looting starts, the shooting starts.”
“We don’t mind being accused of police brutality,” Mr. Headley also said at that news conference. “They haven’t seen anything yet.”
Twitter has for years faced criticism over Mr. Trump’s posts on the platform, which he has used to issue threats, bully critics and spread falsehoods. The company has said repeatedly that the president did not violate its terms of service, however much he appeared to skirt the line.
The company has also said that blocking world leaders from the service or removing their tweets would hinder public debate around their words and actions. Twitter did announce last year, however, that it would in certain cases place warning labels on posts from political figures that broke its rules, the feature it used with Mr. Trump’s tweet about Minneapolis.
Twitter’s attitude appeared to shift this week after Mr. Trump posted about Lori Klausutis, a woman who died in 2001 from complications of an undiagnosed heart condition while working for Joe Scarborough, a Florida congressman at the time. The president has long feuded with Mr. Scarborough, now a host for MSNBC, and in recent days, Mr. Trump had posted conspiracy theories about Ms. Klausutis’s death, suggesting that Mr. Scarborough was involved.
Her widower wrote a letter to Twitter’s chief executive, Jack Dorsey, asking to have the false tweets removed. “I’m asking you to intervene in this instance because the president of the United States has taken something that does not belong to him — the memory of my dead wife — and perverted it for perceived political gain,” Timothy Klausutis wrote.
Twitter did not honor the request. Instead, it placed links and warning labels on other tweets Tuesday in which Mr. Trump said mail-in ballots would cause the November presidential election to be “rigged.” That led him to sign the executive order, which he framed as an effort to fight social platforms’ biases.
Facebook appears to be trying to forestall such criticism. Mark Zuckerberg, the company’s chief executive, told Fox News this week that he was uncomfortable with Facebook’s being “the arbiter of truth of everything that people say online.”
Frederike Kaltheuner, a tech policy fellow at the Mozilla Foundation, said that Twitter’s confrontation with Mr. Trump raised questions about how the platform would treat other world leaders. In March, the company deleted posts by the presidents of Brazil and Venezuela that contained unproven information about Covid-19 treatments.
“I doubt that Twitter has the resources to consistently apply rules to all heads of states that use their platform in all sorts of languages,” Ms. Kaltheuner said. “From all we know about the many inconsistent ways in which other policies are being enforced, my guess is that places that rarely make U.S. news will likely be overlooked.”
In Mr. Trump’s tweets about Minneapolis on Friday, he also criticized Mayor Jacob Frey’s response.
“I can’t stand back & watch this happen to a great American City,” the president wrote. Mr. Trump said Mr. Frey, a Democrat, must “get his act together and bring the City under control, or I will send in the National Guard & get the job done right.”
It was unclear if the president intended to send additional troops after Gov. Tim Walz activated the Minnesota National Guard to help restore order in the Twin Cities. Protests have raged there over the death on Monday of George Floyd, a black man who had been pinned down by a white police officer who pressed his knee on Mr. Floyd’s neck.
Mr. Trump had previously described the video of Mr. Floyd’s death as a “very shocking sight” and “a very very sad event,” saying he had asked the F.B.I.’s investigation to be expedited.
Mr. Frey did not know about Mr. Trump’s tweets until a reporter read them aloud during a news conference early on Friday. The mayor shook his head and then gave a fiery retort, slamming a podium for emphasis.
“Weakness is refusing to take responsibility for your own actions,” he said. “Weakness is pointing your finger at somebody else during a time of crisis.”
“Donald Trump knows nothing about the strength of Minneapolis,” he continued. “We are strong as hell. Is this a difficult time period? Yes. But you better be damn sure that we’re going to get through this.”
Adam Satariano contributed reporting.