Just last month, the video-sharing app TikTok was merely the latest social media craze for millions of Americans. But that was before President Trump identified the company’s Chinese ownership as a potential national security threat, triggering a corporate scramble complicated by China’s refusal to allow TikTok’s innovative technology to fall into American hands.

On Saturday, the president said he had approved a deal in which Oracle and Walmart would partner with TikTok in a new, U.S.-controlled company. Designed to address his objections to possible Chinese government harvesting of Americans’ data, the move came after the Commerce Department abruptly announced Friday it would ban TikTok and WeChat, a second Chinese mobile service, from U.S. app stores. A federal judge later issued a temporary injunction blocking the WeChat ban, meaning both platforms remain available in the United States.

The extraordinary trans-Pacific tussle — China’s foreign ministry groused that it showcased Washington’s “hideous agenda of robbery and economic bullying" — is hardly an isolated occurrence for the fast-souring U.S.-China relationship. This month alone, the Chinese government unveiled new global data security standards designed to outflank a rival U.S. initiative. The American ambassador to China quit his post in Beijing, preferring to help Trump’s reelection bid. And the president vowed publicly “to end our reliance on China once and for all.”

Eight months after Trump and Chinese Vice Premier Liu He signed a partial trade agreement that the president promised would be “transformative," the U.S.-China relationship instead is mired in an escalating number of bitter disputes. Recent developments in both capitals make clear that more than four decades of ever-closer economic ties have reached an end.

The two largest economies on the planet now are moving apart, headed toward a world divided into separate Internets, technology regimes, industrial networks — perhaps even financial systems. In the first half of this year, the two-way flow of investment in factories, stocks and bonds between the United States and China dropped to a nine-year low of $10.9 billion, down 70 percent from its 2017 peak, according to the Rhodium Group, a New York-based consulting firm.

“It’s not a question of whether there’ll be a degree of decoupling. The question is how far it is going to go and how fast it is going to happen,” said Aaron Friedberg, a Princeton University professor who advised then-Vice President Richard B. Cheney on China policy from 2003 to 2005.

A complete rupture between the U.S. and China, involving impenetrable barriers in technology development or a full-scale financial divorce, would face howls from the U.S. business community.

But the administration mood has darkened in recent months with the president lashing out at China’s handling of the coronavirus outbreak. Last week, in a news conference outside the White House, Trump forecast further action.

“Whether it's decoupling or putting in massive tariffs like I've been doing already, we’re going to end our reliance on China because we can't rely on China,” he told reporters. “And I don't want them building a military like they're building right now, and they're using our money to build it.”

At a lavish White House ceremony in January, Trump crowed that the Phase 1 trade deal would lead to $200 billion in new Chinese purchases of U.S. farm, energy and manufactured goods over the next two years. But those orders have been slow to materialize. On a prorated basis through July, China bought less than half as much as required, according to Chad Bown, an economist at the Peterson Institute for International Economics, though the administration remains confident Beijing ultimately will comply.

Even so, administration hawks continue to brainstorm ways to create distance between the two nations. U.S. officials have discussed restricting China’s access to the dollar-based financial system, a move that some analysts warn could destabilize the global economy. In July, the president signed legislation authorizing U.S. sanctions against Chinese officials and financial institutions over their role in eroding Hong Kong’s freedoms.

The prospect of U.S. actions to effectively sever Chinese banks from easy dollar access, perhaps by cutting off access to the SWIFT financial messaging system, is a particular concern in Beijing. “China will not proactively provoke a decoupling from the U.S. dollar or U.S. finance, but we must be prepared for this. ... We cannot rule out the possibility of the U.S. making illogical moves,” concluded a July 28 report from the Bank of China’s investment banking arm.

The study recommended beefing up China’s alternative financial transactions network called the Cross-Border Interbank Payments System in response.

“The Chinese have been hearing this and thinking: If this storm comes, what do we do? How do we insulate ourselves from this?” said Patrick Chovanec, economic adviser for Silvercrest Asset Management.

While the Trump administration, and many Democrats, see China as a growing threat, the nation’s largest companies still regard it as a uniquely lucrative opportunity. China is the world’s largest market for automobiles, video games and computers, and General Motors, Qualcomm, Starbucks, Walmart and Yum Brands each derive a significant portion of their annual revenue from Chinese customers.

“China is a very enticing and wealthy market, so global companies can’t really afford to ignore it,” said Fred Hochberg, former director of the U.S. Export-Import Bank.

As administration officials have emphasized China’s emergence as a threat, they have assailed American business leaders for facilitating its economic rise. In a July speech, Attorney General William P. Barr accused companies such as Disney, Apple and Cisco of “corporate appeasement” for surrendering to Chinese government dictates.

Chinese officials, meanwhile, have been courting American executives in recent months, hoping to prevent the U.S. government from inducing a wholesale loss of foreign-owned factories, according to business executives and analysts. Foreign companies employ roughly 25 million Chinese engineers, managers and assembly line workers, said Nicholas Lardy, an economist with the Peterson Institute for International Economics.

“The business community does not want to be a casualty in the downward trajectory of the relationship,” said Myron Brilliant, executive vice president of the U.S. Chamber of Commerce. “China and the U.S. still need each other.”

The Trump administration already has taken numerous steps to thin the ties that bind the trading partners, maintaining tariffs on $360 billion in Chinese goods, limiting high-tech exports to China and restricting Chinese investment in the United States.

FBI agents in all 56 of the bureau’s field offices are tracking Chinese spies while the State Department curtails new visas for Chinese students. And the Treasury Department has imposed financial sanctions on Chinese officials over human rights violations, including for the first time on a member of the Chinese Politburo, over repression of the Muslim population of Xinjiang.

Chinese Foreign Minister Wang Yi has warned that the United States is pushing relations “to the brink of a new Cold War.”

Still, a more confrontational approach to China would little resemble the faceoff between the United States and Soviet Union, which led distinct economic blocs and fought numerous proxy wars in the developing world.

U.S.-Soviet trade throughout the Cold War was minuscule. In 1984, the United States purchased less than 1 percent of its imports from the Soviet Union, according to a 1987 Rand Corp. report, while Chinese goods last year accounted for 18 percent of all foreign products entering the United States.

“I don’t think ‘Cold War’ is a great analogy. The Soviets didn’t want to be part of our economy and we didn’t want to be part of theirs,” said Scott Kennedy, a senior adviser at the Center for Strategic and International Studies.

Today, the United States is far more entangled with its principal adversary. Even as it eyes China as a possible future wartime opponent, the United States buys from China more than $450 billion worth of goods each year and sells to it an additional $106 billion.

Trade in consumer goods, industrial equipment and agricultural products may raise few national security objections. But selling China advanced computer chips and collaborating with its researchers on artificial intelligence conflicts with the increasingly prevalent view of Beijing as a potential or even likely enemy.

“The boundary for U.S.-China confrontation isn’t geographic. It’s through these different regimes: technology, trade, financial services, Internet governance,” Kennedy said. “These are the new boundaries that are being fought over.”

On the heels of a trade war, the pandemic has accelerated efforts in both countries to become more self-reliant. Chinese President Xi Jinping has intensified efforts under a Made-in-China 2025 initiative to develop homegrown innovations. Both Trump and Democratic presidential nominee Joe Biden support favoring domestic U.S. industries.

Rather than revolutionize the U.S.-China relationship, Trump’s signature trade accord risks becoming a remnant of a lost era of engagement. The coronavirus pandemic, which originated in China, has made Beijing an adversary to be confronted, not a partner to be cultivated.

In July, Secretary of State Mike Pompeo described the Chinese military as “menacing” and said: “Beijing’s actions threaten our people and our prosperity.”

Yet, the U.S.-China unraveling so far has been less comprehensive than the rhetoric suggests.

Despite the president’s tariffs, the United States in the past two months imported $78.3 billion worth of goods from China, slightly more than during the same period in 2016, according to the Commerce Department. And despite consistent urging by the president, there is no wholesale exodus of American companies from China.

Chinese companies this year also are on track for their second-best year ever raising money in U.S. financial markets, even as the administration discourages major U.S. investors from buying Chinese shares, according to the Rhodium Group report, which was released in tandem with the National Committee on U.S.-China Relations.

“You haven’t yet seen a broad-based decoupling,” said Brad Setser, a former Obama administration White House economist.

That may be on the horizon. The Commerce Department recently tightened further its restrictions on the sale of U.S. computer chips to Huawei, one of China’s most prominent companies, brushing aside worries about the damage to U.S. suppliers.

China buys about $300 billion worth of semiconductors each year, most of them designed by U.S.-owned firms. San Diego-based Qualcomm, a leading wireless technology provider, attributed 48 percent of its $24 billion in revenue last year to China.

While the United States already has taken unprecedented steps to sever technology links to China, tougher action could lie ahead. The administration is considering limits on sales of the equipment China needs to produce computer chips, which would likely involve a major clash with Silicon Valley, analysts said.

Companies such as Applied Materials, Lam Research and KLA-Tenor, which dominate the global market for chip-making gear, are reluctant to lose out on China’s massive spending.

“There definitely will be pushback on the tougher strategy,” said Robert Atkinson, president of the Information Technology and Innovation Foundation.

A broad embargo on sales of chip-making equipment to China also could backfire by prompting some manufacturers to shift production out of the United States, according to Dan Wang, a technology analyst with Gavekal Dragonomics, a Hong Kong-based research firm. In February, Lam Research, a maker of wafer fabrication equipment based in Fremont, Calif., announced a new 700,000 square-foot production site in Malaysia.

In a series of speeches, U.S. officials have described earlier efforts to welcome China into the global economy as “naive” and badly mistaken. The ruling Chinese Communist Party, national security adviser Robert O’Brien said in June, threatens “our very way of life.”

The administration has shown less self-awareness about shortcomings in the president’s “America First” approach. His limited Phase 1 deal failed to achieve the structural changes in China’s state-directed economy that U.S. Trade Representative Robert E. Lighthizer in 2018 described as the negotiations’ goal.

Likewise, in July, the overall U.S. trade deficit — which the president says bleeds money and jobs from the U.S. economy — reached its highest level in 12 years. The gap between what the United States sells China and what it buys from the Chinese has narrowed, but the deficit with other countries has increased by an even larger amount as Trump’s tariffs encouraged American importers to order from Vietnamese or Mexican suppliers instead of the Chinese.

Administration officials, including Peter Navarro, an assistant to the president, say the pandemic illustrates the vulnerability of global supply chains. The president last month issued an executive order requiring government agencies to consider buying more “essential medicines” from domestic producers.

An increasing number of foreign companies in China are considering relocating at least some production to other countries to avoid being dependent upon a single location or to be closer to customers. New direct investment by U.S. companies fell 31 percent in the first half of the year to $4.1 billion, according to Rhodium.

Some foreign companies may shift a portion of their China-based production elsewhere to make their supply lines more resilient. But China has advantages in scale, trained workforce and infrastructure that alternative locations cannot match.

But there was no sign that major companies were abandoning existing projects, such as ExxonMobil’s $10 billion petrochemical complex, JPMorgan Chase’s $1 billion acquisition of a Chinese mutual fund joint venture or GM’s electric vehicle work, the group said.

In a survey this month of 346 members of the U.S. Chamber of Commerce, 85 percent said they were not considering relocating production from China. Moving foreign companies’ export-oriented factories from China would cost $1 trillion over five years, according to analysts at Bank of America, who said planned relocations “are small” relative to multinationals’ total China footprint.

“This is not win-lose or binary. It’s more complicated than that,” said Craig Allen, president of the U.S. China Business Council. “It’s in our interest to work with the Chinese.”

A cooler U.S. approach to China is likely to persist no matter who wins the presidential election in November. Biden promises to crack down on Chinese trade practices and wants to promote greater domestic production of drugs, energy, telecommunications and raw materials at the expense of current foreign suppliers.

By a margin of 66 percent to 26 percent, Americans in April held an unfavorable view of China, according to the Pew Research Center. In 2012, they split 40 percent to 40 percent.

Chinese actions are fueling the bipartisan shift in Washington. Since taking power in 2012, Xi has expanded China’s military, cracked down on Hong Kong’s independence, and imprisoned more than 1 million Muslims in Xinjiang. The president blames China for covering up the initial coronavirus outbreak, allowing it to spread globally and plunge the U.S. and global economies into recession.

After being slow to recognize Washington’s attitudinal shift, the Chinese government recognizes that its problems would not end if Trump were defeated in November. Xi in recent speeches has emphasized a new “dual circulation” economic policy that would emphasize development of the domestic economy rather than global links.

“They seem to think a corner has been turned,” Friedberg said. “And things aren’t going to go back to the way they were.”