The improbable romance between the Chinese state and the Houston Rockets, of the National Basketball Association, began in 2002, when the team drafted the game’s first bona-fide Chinese icon: Yao Ming, a humble giant with decent fundamentals and a height of seven feet six. China had long been a tantalizing destination for the N.B.A.—basketball was far more popular in China than American football or baseball. But it was such an unfamiliar place to the team’s executives that, before they made their first trip to negotiate Yao’s arrival, a Sinologist gave them a briefing on Chinese culture, including the concept of losing face and the suspicion of outsiders. Yao’s arrival in Houston was transformational. Within two years, the league was holding preseason games in China, and, by 2008, it had launched N.B.A. China to manage its operations. The Communist Party kept a close eye on the league, oscillating between what Brook Larmer, the author of the 2005 book “Operation Yao Ming,” called “its fear of losing control and its desire for international prestige.”

Over time, China became uniquely important to the N.B.A. By the 2017-2018 season, more than six hundred million Chinese fans were watching N.B.A. games and other content, and nearly a third of all N.B.A. subscriptions for live-streaming were in Asia. Yao played with the Houston Rockets for eight seasons, and the team became an instant favorite in China. It launched a Chinese-language Web site, and the team occasionally wore jerseys themed to the lunar New Year. After he retired, in 2011, Yao bought a team, the Shanghai Sharks, that still visits Houston for preseason games.

This week, the N.B.A.’s relationship with China took a sharp turn. On Saturday morning, during a visit to Tokyo, the Rockets’ general manager, Daryl Morey, tweeted an image that was circulating on social media, which contained a protest slogan: “Fight For Freedom. Stand With Hong Kong.” Morey deleted it soon afterward, but by then a screenshot had been captured and widely shared by China’s state-media outlets, triggering an avalanche of political and economic reactions that reveal some often-overlooked drivers of tension between the United States and China.

Even if Morey hadn’t deleted his tweet, it wouldn’t have had many viewers in China, because the Chinese government has banned Twitter since 2009, for fear of political turbulence. But, in recent years, as researchers at the China Media Project have tracked, the government has sharply expanded its effort to control how it is discussed outside its own borders, to export what the Communist Party calls huayu quan—“discourse power”—over who can speak about China and what they can say. In December, 2013, just more than a year after Xi Jinping became the General Secretary of the Communist Party, he told the Politburo that China “must pay attention to the shaping of our country’s national image.” Instead of relying on creaky old state newspapers that were ignored outside of China, he urged the use of “newly emerging media to raise the creative strength, charisma, and credibility of our external discourse, telling Chinese stories well.” In February, 2016, Xi made high-profile visits to state news organizations and delivered a speech on the importance of “external propaganda that have relatively strong international influence.”

When the protests grew in Hong Kong over the summer—initially over an extradition law, but eventually over a broad range of Chinese controls—the government in Beijing launched a specific campaign to shape the global discussion of them. Chinese diplomats posted to more than seventy countries and international organizations wrote op-eds or gave interviews that condemned the protests and accused the West of stirring a “color revolution,” a reference to the “color revolutions” that swept through the former Soviet bloc. Beijing also encouraged the use of social-media networks such as Twitter, Facebook, and YouTube (all banned inside China), but the campaign to carpet-bomb critics with China’s perspective—sometimes known in China as “occupying” the Internet—was so well-organized that, in August, the three sites announced that they had removed thousands of accounts for what Twitter called a “coordinated state-backed” operation that was “specifically attempting to sow political discord in Hong Kong.”

In the hours after Daryl Morey’s tweet, his employer came under assault. The Chinese Basketball Association, which is China’s national league, cut “exchanges and cooperation” with the team, and sponsors such as the sportswear giant Li-Ning and SPD Bank abandoned it. Tencent Sports, which streams Rockets games, suspended broadcasts. And CCTV Sports, part of the state broadcaster, dropped plans to broadcast preseason games played in China. The team’s merchandise disappeared from Taobao, the e-commerce site. Online, Chinese users sought to “occupy” Morey’s account with angry replies, including “NMSL”—Chinese Internet slang for “your mother is dead.”

The reactions among Americans were more revealing. The team owner, Tilman Fertitta, tried to distance his business from its general manager (“@dmorey does NOT speak for the @HoustonRockets”). For the N.B.A., it was an especially awkward problem. The league has a reputation for defending the value of free speech, and is often favorably compared with the N.F.L.’s efforts to discourage protests during the national anthem. In January, moreover, the N.B.A. actively defended a player’s right to criticize the Turkish President, Recep Tayyip Erdoğan.

But, in Morey’s case, the league tried, in vain, to assuage all parties. The N.B.A. issued a statement in English calling Morey’s tweet “regrettable,” while asserting that “the values of the league support individuals’ educating themselves and share their views on matters important to them.” But, in translation, the N.B.A.’s Chinese social-media account added words and phrases to say, “We are extremely disappointed in the inappropriate remarks made by Houston Rockets General Manager Daryl Morey.” With that attempt at a balancing act, the N.B.A. managed to unite Democrats and Republicans, who accused the league of servility. Beto O’Rourke, the Presidential hopeful and former congressman from the Rockets’ home state of Texas, tweeted, “The only thing the NBA should be apologizing for is their blatant prioritization of profits over human rights. What an embarrassment.” Senator Ted Cruz, of Texas, tweeted, “in pursuit of big $$, the @nba is shamefully retreating.”

On Tuesday, the N.B.A. settled on a clearer stance. Acknowledging that its original statement had left people “angered, confused or unclear,” the league’s commissioner, Adam Silver, issued a statement: “The NBA will not put itself in a position of regulating what players, employees and team owners say or will not say. We simply could not operate that way.” That clarified its position, and also heightened the chances of further tension with China.

The Morey affair offered something for all sides. To critics of engagement with China (an ascendant voice in Washington these days), it was evidence of the moral peril of entering a market that has come to expect extraterritorial rights of censorship. To executives whose businesses depend on China—voices that were conspicuously quiet this week—it was less of a surprise; for them, it was fresh evidence that, like it or not, China’s scale makes it impossible to ignore, which is why Hollywood has adopted self-censorship to remove plots or characters that the Chinese state won’t like.