But analysts say that Xi is gambling that Trump won't enact sanctions or introduce new tariffs against China that could intensify the trade war and risk damaging an already weak U.S. economy just months before he seeks reelection.
"The U.S. will absolutely talk tough on China -- and there will likely be skirmishes for the next six months -- but Trump will think twice before taking any action against China, which dims the prospects for a V-shaped economic recovery," said Steven Okun, a Singapore-based senior advisor with McLarty Associates, a consulting company.
Beijing's strategy seemed to be long in the making, beginning soon after street protests erupted in Hong Kong a year ago in response to an extradition bill and soon evolved into a broader anti-China movement.
In February Xi appointed several hard-line officials to the departments managing Hong Kong affairs. Last month, with the coronavirus outbreak silencing protests, Hong Kong authorities arrested more than a dozen prominent critics of China.
Still, Beijing's decision stunned many when it was reported on Thursday at the beginning of the Communist Party's National People's Congress.
"Hong Kong is in a state of shock," said Willy Lam, a political analyst at the Chinese University of Hong Kong.
A draft of the decision published in local media on Friday authorizes Beijing to insert the new national security laws directly into the Basic Law, Hong Kong's quasi-constitution, circumventing the local government. It calls for Chinese security institutions -- which have long maintained a covert presence in Hong Kong -- to open branches inside the territory and for Hong Kong's judiciary, which until now has been relatively independent, to punish "actions that harm national security."
Analysts said the erosion of legal protections could accelerate the flight of affluent and middle-class Hong Kong families to the West and drive more businesses out of the global financial center. Many foreign companies began to shift personnel and capital to Singapore, Taiwan and elsewhere after last summer's protests.
Lam said Hong Kong would pay an economic price for the law because businesses rely on independent courts free of political meddling.
"The Chinese economy is not doing very well and this will have a detrimental impact on business in Hong Kong," Lam said. "But for Xi Jinping, law and order is more important than business. He would rather solve the law and order problem first and pacify the foreign businesspeople later on."