The company prevented users from viewing Mr. Trump’s message without first reading a brief notice describing the rule violation. Twitter also blocked users from liking or replying to Mr. Trump’s post.
But Twitter did not take the tweet down, saying it was in the public’s interest that the message remain accessible.
Twitter said that it had made its decision “based on the historical context of the last line, its connection to violence, and the risk it could inspire similar actions today.”
In the tweet, Mr. Trump called the protesters “thugs” and said he had told Minnesota’s governor that the military “is 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!”
The company’s decision comes a day after Mr. Trump signed an executive order that seeks to to limit the legal protections that shield social media companies from liability for the content posted on their platforms. The president had fulminated over Twitter’s decision earlier this week to append 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 put a stop to the interference.
In Mr. Trump’s tweets about the Minneapolis protests, which he posted early Friday morning, he also criticized Mayor Jacob Frey’s response to the demonstrations.
“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.
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.”