US officials considered, but ultimately decided against a ban on American investments in Alibaba Group Holding Ltd. and Tencent Holdings Ltd., as one familiar with the discussions said, to clear a cloud of uncertainty over Asia’s two largest companies.

The finance department blocked a Pentagon action to add the two internet companies for helping the military, the person said, asking not to be identified in order to discuss private conversations. Officials also discussed blocking the search guide, Baidu Inc., but dropped the plan, the person added. Alibaba’s shares in Hong Kong rose 3.9 percent, while Tencent rose nearly 5 percent on news of the postponement first reported in the Wall Street Journal. Their dollar bond spreads tightened Thursday morning.

The decision removes uncertainty over Chinese social media and gaming leaders Tencent and Alibaba, the e-commerce titan founded by billionaire Jack Ma, which is currently under intense regulatory scrutiny by Beijing’s regulators. President Donald Trump has signed an amended version of his ordinance banning investments in companies related to the Chinese military, the White House said in a statement on Wednesday that did not mention any company by name.

Imposing a ban on the couple would have been the most dramatic escalation of the outgoing administration to date, given the size of the two companies and the difficulty of shedding positions. At more than $ 1 trillion, their combined market value is almost twice that of the Spanish stock market, while the companies together account for about a tenth the weighting of the MSCI Inc. emerging market benchmark.

Citing national security, Trump signed an executive order back in November urging investors to pull out of Chinese companies associated with the nation’s military. The Department of Defense will add more companies to the list, the person said without further elaboration.

This would further worsen the relationship between the world’s two largest economies, which have argued over everything from COVID-19 to Hong Kong. Washington authorities have stepped up efforts to withdraw US capital from Chinese companies in the last few months of the Trump administration, adding to economic tensions as President-elect Joe Biden prepares to take over this month.

“China is against the politicization of economic and trade issues and the abuse of state power and the concept of national security to suppress foreign companies,” said Chinese Foreign Ministry spokesman Zhao Lijian during a regular briefing on Thursday. Zhao urged the US to respect the principles of the market economy and to provide foreign companies with a fair, impartial and transparent business environment.

Hasty action has at times caused market confusion and price volatility, for example when the New York Stock Exchange twice reversed to delist three Chinese telecommunications companies. The NYSE is now continuing its original delisting plan after US Treasury Secretary Steven Mnuchin disagreed with his decision to give the companies redress.

Trump’s order banned trading in affected securities from January 11th. If Biden allows Trump’s executive order to stand, US investment firms and pension funds would have to sell their holdings in companies associated with the Chinese military by November 11th. And if the US has military ties in the future, American investors will have 60 days after that decision to divest.