Twitter has hidden a tweet by President Donald Trump from his profile, saying it violates rules about glorifying violence.
It did the same hours later when the official White House account tweeted a copy of the president's words.
Instead of being deleted, both tweets can be viewed by clicking on a prominent warning.
It says that "Twitter has determined that it may be in the public's interest for the Tweet to remain accessible."
This is the latest twist in an escalating row between Twitter and the White House.
The US president finds himself in unexpected company alongside other world leaders whose tweets have been censored.
In February 2019, Twitter had a tweet by Iranian Leader Supreme Ayatollah Ali Khamenei removed after it appeared to threaten author Salman Rushdie.
Also last year, several accounts associated with Cuban President Raul Castro and members of his government were suspended, citing policy violations.
Mr Trump was tweeting about the US city of Minneapolis, which has seen consecutive nights of protests following the death of a black man in police custody.
The president said he would "send in the National Guard", and followed that up with a warning that "when the looting starts, the shooting starts."
That second tweet was hidden by Twitter for "glorifying violence".
Twitter's policy of adding a warning to, rather than deleting, tweets that break its rules when it comes to major public figures was announced in mid-2019. But the social network has never used it on Mr Trump - nor deleted any of his tweets before.
"This is the bravest and riskiest thing I've ever seen Twitter - or any social media giant - do," said Carl Miller, from the Centre for the Analysis of Social Media at UK-based think-tank Demos.
"This pours rocket fuel over the online-harm-versus-free-speech debate. Online content policy doesn't get more incendiary than this."
The same post remains unaltered on Facebook, without any warning attached.
On Friday, the president sought to clear up the tweets by saying he was misunderstood.
"Looting leads to shooting, and that's why a man was shot and killed in Minneapolis on Wednesday night - or look at what just happened in Louisville with 7 people shot," he tweeted.
Seven people were shot in Louisville, Kentucky, at a protest over the death of Breonna Taylor, who was shot by three white police officers in March.
"I don't want this to happen, and that's what the expression put out last night means," he wrote.
For years Twitter resisted calls to treat Donald Trump like any other user and make him follow its rules.
Then, on Wednesday, it made a first small move, not removing a tweet but adding a fact-checking link.
The company then had two choices - hunker down and weather the storm or continue to take action in accordance with its stated rules. It has now chosen the latter course of action, calling the president out for glorifying violence.
Any other user would have had their tweet removed, and might have seen their account suspended.
It now looks as though there is no easy way out for either of the two adversaries - a huge battle over the limits of free speech and the rights of social media firms to moderate content is looming.
It is difficult to see either side now backing down. The White House is busy scouring Twitter to find examples of other world leaders who have glorified violence without any comeback. Meanwhile others are finding all sorts of old Trump tweets that appear to have broken the rules by, for instance, spreading misinformation about treatments for coronavirus.
Twitter boss Jack Dorsey, who had appeared very reluctant to apply anything but the most light-touch regulation, now finds himself faced with the unappealing prospect of cracking down on world leaders far and wide.
The move means that other users will not be able to like, reply to, or simply retweet Mr Trump's post, Twitter said. However, they would still be able to retweet it with a comment attached.
In a Twitter thread, the social network said: "This tweet violates our policies regarding the glorification of violence based on the historical context of the last line, its connection to violence, and the risk it could inspire similar actions today."
The "historical context" is a reference to the phrase "when the looting starts, the shooting starts", coined by Miami Police Chief Walter Headley in 1967, in reference to his aggressive policing policies in black neighbourhoods.
A later report submitted to the National Commission on the Causes and Prevention of Violence found that his "get tough" policy, involving "the frequent display of shotguns and dogs by Miami police in black neighbourhoods" contributed to a state of agitation in the black community until the eruption of the 1968 Miami riot some eight months later.
Twitter said: "We've taken action in the interest of preventing others from being inspired to commit violent acts, but have kept the tweet on Twitter because it is important that the public still be able to see the tweet given its relevance to ongoing matters of public importance."
Hours after the warning was added, President Trump tweeted: "Twitter is doing nothing about all of the lies & propaganda being put out by China or the Radical Left Democrat Party" and alleged that the social network was targeting Republicans.
Twitter is doing nothing about all of the lies & propaganda being put out by China or the Radical Left Democrat Party. They have targeted Republicans, Conservatives & the President of the United States. Section 230 should be revoked by Congress. Until then, it will be regulated!— Donald J. Trump (@realDonaldTrump) May 29, 2020
He directly referenced the executive order he signed the previous evening, aimed at removing some of the legal protections given to social media platforms.
Earlier this week, Twitter used its fact-checking function to attach warnings to the president's tweets for the first time. That led the president to threaten to "shut down" social networks over allegedly stifling free speech.
The executive order signed by Mr Trump has no immediate effect on the social networks, however - instead, it begins a lengthy process that may result in changes down the line.