For decades, China has been crucial to the NBA's rise as a global brand. This weekend, the risks of that success became clear.

A Houston Rockets executive set off a geopolitical firestorm after expressing support for pro-democracy protests in Hong Kong in a tweet sent on Friday night. General manager Daryl Morey, 47, quickly deleted the tweet and posted a clarification, insisting he did not intend to offend anyone in China.

But the damage was done. The NBA's Chinese partners suspended ties with the franchise, Chinese sponsors yanked their money, and Chinese television outlets said they would no longer air Rockets games.

The league distanced itself from Morey, saying his "regrettable" tweet had "deeply offended" many of the league's fans in the world's most populous country, where more than 300 million people play basketball and hundreds of millions more watch games every season.

The response may have helped with damage control, but it also provoked intense criticism in the U.S., where Republican and Democratic politicians — including some presidential candidates — called the move "kowtowing" and "disgusting."

NBA officials have spent years cultivating lucrative deals and loyal spectators in China, while also courting powerful investors and building massive followings on regional social media platforms. The league's dominance, however, requires officials to steer clear of political controversy or else risk alienating the nation's autocratic leaders.

"Here we have a case of the NBA putting its financial interests ahead of its supposed values," said Harvey Araton, a veteran sports journalist and author of "Elevated: The Global Rise of the NBA."

The situation also poses a particular challenge for the NBA after it offered support for players who felt compelled to speak out on domestic issues, such as police killings of young black men. The ongoing tensions with China, however, open up the league to charges of hypocrisy on questions of free speech.

"Until now, the NBA has not had to contend as publicly with the human rights and political issues of China [and] the Chinese market, even though it has remained quiet on human rights abuses within the country," said Lindsay Sarah Krasnoff, a sports historian.

The league's expansion into the Chinese market began in the late 1980s, when the commissioner at the time, David Stern, convinced China's state-run television network, CCTV, to broadcast games on tape-delay. By the mid-1990s, all NBA final games were aired live there.

"Stern realized that China was an explosive market," Araton said. "When you have a country of that magnitude, where basketball is the most popular sport, you have tremendous marketing value for an organization with a global strategy."

The NBA's ascent to dominance in China was accelerated after the Houston Rockets tapped the 7-foot-6 Shanghai-born center Yao Ming in the 2002 draft, turning him into an international superstar who symbolized the budding partnership between the two global powers.

In recent years, the bond over basketball seemed tighter than ever, even with the looming threat of President Donald Trump's trade war with China President Xi Jinping — and the business opportunities for the NBA have expanded beyond just watching games.

As of this fall, a staggering 40 million Chinese people were registered to play a popular basketball video game. Thousands of spectators reportedly turned out this summer to watch the sons of LeBron James and Dwyane Wade play in exhibitions. Other league stars, including Stephen Curry and James Harden, reportedly pay annual visits.

Maybe most crucially of all for the NBA, the league recently announced a five-year extension of its pact with Tencent Holdings, a Chinese technology behemoth, to stream games in China in a deal reported to be worth some $1.5 billion.

"When I have 76ers gear on and I walk through Shanghai, walk through Shenzhen, if I had a nickel for every time somebody said 'Trust the process' in perfect English, I wouldn't be standing here working," Philadelphia 76ers CEO Scott O'Neil told the Associated Press this fall, referring to a team motto.

"We're very much part of the fabric of China," O'Neil added.

The league has generally managed to avoid diplomatic snafus in China, but Morey's tweet offers an indication of how years of strategic groundwork can be ruptured in a single move.

Chinese state media has characterized the Hong Kong protesters as unruly rioters, exercising outsize influence on public opinion amid months of clashes between demonstrators and police. The root of the crisis is proposed legislation, since rescinded, that sought to allow China to extradite suspects in Hong Kong to the mainland. The protesters' demands have grown to include more autonomy and investigations into allegations of police brutality.

The NBA is far from the first American-owned brand that has felt moved to apologize to China after running afoul of delicate political sensitivities or other contentious cultural issues.

Remember when Marriott fired a guy for liking a “free Tibet” account from an official Marriott account https://t.co/KEB4HULIDe — Max Read (@max_read) October 7, 2019

The retail company Gap, for example, apologized in May for selling a T-shirt in Canada that depicted a map of China without including Taiwan, the self-governing island off the southern coast of the mainland. The German carmaker Daimler apologized a few months earlier for a Mercedes-Benz social media post that quoted the Dalai Lama, who some in China see as a threat to national sovereignty.

And professional sports is not the first American industry that has been forced to walk a tightrope when it comes to Chinese affairs.

Hollywood studios and distributors, for example, have been known to modify movies to suit Chinese tastes or re-edit projects that might cause offense. In recent months, for instance, episodes of CBS's legal drama "The Good Fight" and Comedy Central's animated comedy "South Park" that mocked Chinese censorship were reportedly censored.

The NBA's international presence and increasingly was previously thrust into a thorny geopolitical issue when Enes Kanter, a Swiss-born Turkish star, was wanted by Turkish authorities for his criticism of President Recep Tayyip Erdogan.

In an attempt to smooth over tensions Monday, Rockets star James Harden offered an apology to the people of China.

"You know, we love China. We love playing there," Harden said at a practice in Tokyo. "They show us the most important love."