OAKLAND, Calif. — Jack Dorsey was up late Thursday at his home in San Francisco talking online with his executives when their conversation was interrupted: President Trump had just posted another inflammatory message on Twitter.
Tensions between Twitter, where Mr. Dorsey is chief executive, and Mr. Trump had been running high for days over the president’s aggressive tweets and the company’s decision to begin labeling some of them. In his latest message, Mr. Trump weighed in on the clashes between the police and protesters in Minneapolis, saying, “when the looting starts, the shooting starts.”
A group of more than 10 Twitter officials, including lawyers and policymakers, quickly gathered virtually to review Mr. Trump’s post and debate over the messaging system Slack and Google Docs whether it pushed people toward violence.
They soon came to a conclusion. And after midnight, Mr. Dorsey gave his go-ahead: Twitter would hide Mr. Trump’s tweet behind a warning label that said the message violated its policy against glorifying violence. It was the first time Twitter applied that specific warning to any public figure’s tweets.
The action has prompted a broad fight over whether and how social media companies should be held responsible for what appears on their sites, and was the culmination of months of debate inside Twitter. For more than a year, the company had been building an infrastructure to limit the impact of objectionable messages from world leaders, creating rules on what would and would not be allowed and designing a plan for when Mr. Trump inevitably broke them.
But the path to that point was not smooth. Inside Twitter, dealing with Mr. Trump’s tweets — which are the equivalent of a presidential megaphone — was a fitful and uneven process. Some executives repeatedly urged Mr. Dorsey to take action on the inflammatory posts while others insisted he hold back, staying hands-off as the company had done for years.
Outside Twitter, the president’s critics urged the company to shut him down as he pushed the limits with insults and untruths, noting ordinary users were sometimes suspended for lesser transgressions. But Twitter argued that posts by Mr. Trump and other world leaders deserved special leeway because of their news value.
The efforts were complicated by Mr. Dorsey, 43, who was sometimes absent on travels and meditative retreats before the coronavirus pandemic. He often delegated policy decisions, watching the debate from the sidelines so he would not dominate with his own views. And he frequently did not weigh in until the last minute.
Now Twitter is at war with Mr. Trump over its treatment of his posts, which has implications for the future of speech on social media. In the past week, the company for the first time added fact-checking and other warning labels to three of Mr. Trump’s messages, refuting their accuracy or marking them as inappropriate.
In response, an irate Mr. Trump issued an executive order designed to limit legal protections that tech companies enjoy and posted more angry messages.
Twitter’s position is precarious. The company is grappling with charges of bias from the right over its labeling of Mr. Trump’s tweets; one of its executives has faced a sustained campaign of online harassment. Yet Twitter’s critics on the left said that by leaving Mr. Trump’s tweets up and not banning him from the site, it was enabling the president.
“It really is about whether or not Twitter blinks,” said James Grimmelmann, a law professor at Cornell University. “You really have to stick to your guns and ensure you do it right.”
Twitter is girding for a protracted battle with Mr. Trump. Some employees have locked down their social media accounts and deleted their professional affiliation to avoid being harassed. Executives, holed up at home, are meeting virtually to discuss next steps while also handling a surge of misinformation related to the pandemic.
This account of how Twitter came to take action on Mr. Trump’s tweets was based on interviews with nine current and former company employees and others who work with Mr. Dorsey outside of Twitter. They declined to be identified because they were not authorized to speak publicly and because they feared being targeted by Mr. Trump’s supporters.
A Twitter spokesman declined to comment. Mr. Dorsey tweeted on Friday that the fact-checking process should be open to the public so that the facts are “verifiable by everyone.”
Mr. Trump said on Twitter that his recent statements were “very simple” and that “nobody should have any problem with this other than the haters, and those looking to cause trouble on social media.” The White House declined to comment.
The confrontation between Mr. Trump and Twitter has raised questions about free speech. Under Section 230 of the Communications Decency Act, social media companies are shielded from most liability for the content posted on their platforms. Republican lawmakers have argued the companies are acting as publishers and not mere distributors of content and should be stripped of those protections.
But a hands-off approach by the companies has allowed harassment and abuse to proliferate online, said Lee Bollinger, the president of Columbia University and a First Amendment scholar. So now the companies, he said, have to grapple with how to moderate content and take more responsibility, without losing their legal protections.
“These platforms have achieved incredible power and influence,” Mr. Bollinger said, adding that moderation was a necessary response. “There’s a greater risk to American democracy in allowing unbridled speech on these private platforms.”
For years, Twitter did not touch Mr. Trump’s messages. But as he continued using Twitter to deride rivals and spread falsehoods, the company faced mounting criticism.
That set off internal debates. Mr. Dorsey observed the discussions, sometimes raising questions about who could be harmed by posts on Twitter or its moderation decisions, executives said.
In 2018, two of the president’s tweets stood out to Twitter officials. In one, Mr. Trump discussed launching nuclear weapons at North Korea, which some employees believed violated company policy against violent threats. In the other, he called a former aide, Omarosa Manigault Newman, “a crazed, crying lowlife” and “that dog.”
At the time, Twitter had rules against harassing messages like the tweet about Ms. Manigault Newman, but left the tweet up.
The company began working on a specific solution to allow it to respond to violent and inaccurate posts from Mr. Trump and other world leaders without removing the messages. Mr. Dorsey had expressed interest in finding a middle ground, executives said. It also rolled out labels to denote that a tweet needed fact-checking or had videos and photos that had been altered to be misleading.
The effort was overseen by Vijaya Gadde, who leads Twitter’s legal, policy, trust and safety teams. The labels for world leaders, unveiled last June, explained how a politician’s message had broken a Twitter policy and took away tools that could amplify it, like retweets and likes.
“We want to elevate healthy conversations on Twitter and that may sometimes mean offering context,” Del Harvey, Twitter’s vice president of trust and safety, said in an interview this year.
By the time the labels were introduced, Mr. Trump was not the only head of state testing Twitter’s boundaries. Shortly before Twitter released them, the president of Brazil, Jair Bolsonaro, tweeted a sexually explicit video and the Iranian leader Ali Khamenei posted threatening remarks about Israel.
Last month, Twitter used the labels on a tweet from the Brazilian politician Osmar Terra in which he falsely claimed that quarantine increased cases of the coronavirus.
“This Tweet violated the Twitter Rules,” the label read. “However, Twitter has determined that it may be in the public’s interest for the Tweet to remain accessible.”
On Tuesday, Twitter officials began discussing labeling Mr. Trump’s messages after he falsely asserted that mail-in ballots were illegally printed and implied they would lead to fraud in the November election. His tweets were flagged to Twitter through a portal it had opened specifically for nonprofit groups and local officials involved in election integrity to report content that could discourage or interfere with voting.
Twitter quickly concluded that Mr. Trump had posted false information about mail-in ballots. The company then labeled two of his tweets, urging people to “get the facts” about voting by mail. An in-house team of fact checkers also assembled a list of what people should know about mail-in ballots.
Mr. Trump struck back, drafting an executive order designed to chip away at Section 230. He and his allies also singled out a Twitter employee who had publicly criticized him and other Republicans, falsely suggesting that employee was responsible for the labels.
Mr. Dorsey and his executives kept on alert. On Wednesday, Twitter labeled hundreds of other tweets, including those that falsely claimed to include images of Derek Chauvin, the white police officer who was charged with third-degree murder and second-degree manslaughter in the death of George Floyd, an African-American man in Minnesota.
Mr. Trump did not let up. Even after Twitter called out his shooting tweet for glorifying violence, he posted the same sentiment again.
“Looting leads to shooting,” Mr. Trump wrote, adding that he did not want violence to occur. “It was spoken as a fact.”
This time, Twitter did not label the tweet.