China vowed Friday to take “countermeasures” against the United States if the Trump administration attempts to punish Beijing for tightening its grip on Hong Kong, ratcheting up tensions between the world’s two biggest economies.

The Chinese warnings were met later Friday with broadsides from President Trump, who accused China of a “pattern of misconduct” and said U.S. officials will begin steps to revoke Hong Kong’s special status under U.S. law.

That means the United States would no longer treat Hong Kong and China as separate entities for the purposes of extradition, customs, trade and visa issues, he told reporters during remarks in the White House Rose Garden.

Trump also repeated allegations that the Chinese government covered up the coronavirus outbreak and said Washington is “terminating” its ties with the World Health Organization, which Trump claims is deferential to Beijing.

On another front, China separately threatened military action to “resolutely smash” any move by Taiwan toward declaring independence. The threat raised the prospect of a regional conflict that could draw in the United States.

Analysts on both sides are increasingly worried about the rapid deterioration in relations, already at their worst in decades.

“China is fed up with being the nice guy. Now any negative comments and actions from the U.S. are bound to trigger diplomatic reactions or other countermeasures in China,” said Xi Junyang, a professor at Shanghai University of Finance and Economics. “The question is how far China is willing to go and what cards we have.”

In Beijing, Chinese Foreign Ministry spokesman Zhao Lijian warned Trump against such “wanton restrictions” and threatened retaliation.

“The U.S. should see things clearly and stop interfering in Hong Kong’s affairs,” he said. “If the U.S. insists on intervening, China will take all necessary countermeasures.”

China’s National People’s Congress on Thursday approved a plan to draft a new law that would essentially criminalize protests and other political behavior that Beijing disdains, effectively ending the “one country, two systems” framework that has allowed Hong Kong to operate relatively independently of the mainland.

Secretary of State Mike Pompeo has called the new law a “death knell” for the framework and has advised Congress that Hong Kong can no longer be considered autonomous, a step toward stripping the area of the special status that has allowed the United States to trade with it as an entity separate from mainland China for the past 23 years.

Zhao said Friday that Pompeo was “just too full of himself” and that no country allows “separatists and other activities undermining national security on its territory.”

The differences over Hong Kong, coming on top of heated exchanges about the coronavirus pandemic, have dramatically worsened an already hostile relationship between Beijing and Washington. The two sides are now embroiled in disagreements about trade, technology, human rights and press freedom.

“It is deeply worrying that China and the U.S. are facing off in arenas other than politics,” said Shen Yamei, a research fellow on China-U. S. relations at the China Institute of International Studies, a Beijing-based think tank.

With neither the United States nor China willing to sit down for rational and sensible talks, Shen said, she was reminded of the inability to communicate before the normalization of diplomatic relations in 1979.

“Contrary to what the world had expected, the pandemic has so far failed to pull China and the U.S. into cooperation,” she said. “It is a time for pessimism, but who knows, maybe the need to revive the global economy post-pandemic could help the two countries find a common ground.”

The stakes could hardly be higher if the two powers move in the opposite direction.

While China and the United States have been involved in rhetorical salvos and tariff battles, the prospect of actual war is not beyond possibility.

Marking the 15th anniversary Friday of a Chinese anti-secession law, which states that there is only one China and that Taiwan is part of it, Li Zuocheng, chief of the Joint Staff Department and a member of the Central Military Commission, vowed to use force if necessary to seize control of the democratic island.

“If the possibility for peaceful reunification is lost, the people’s armed forces will, with the whole nation, including the people of Taiwan, take all necessary steps to resolutely smash any separatist plots or actions,” Li said in the Great Hall of the People in Beijing.

“We will not commit ourselves to renouncing the use of force on the Taiwan issue, and will reserve the option of taking all necessary measures,” he said.

The anti-secession law states that China can use “non-peaceful means” if Taiwan declares independence or takes steps to do so.

While China has long said it would not renounce force to take Taiwan, its language Friday was escalatory and seems to signal that Beijing realizes that peaceful “reunification” looks increasingly unlikely.

The ruling Communist Party in Beijing views the self-governed island as a breakaway province that should be under its rule. Taiwan, however, has never been part of the People’s Republic of China.

The threats come amid mounting aggression on all geographic fronts, with China embroiled in a military standoff on its western border with India, confrontation in the South China Sea and increasingly rancorous relations with Australia and Canada.

Since Taiwan’s independence-leaning president, Tsai Ing-wen, came to power four years ago, Beijing has sought to isolate Taiwan from the international community, peeling away its remaining diplomatic allies and exerting diplomatic pressure to ensure its exclusion from global bodies such as the World Health Organization.

Taiwan has held itself up as a Chinese-speaking bastion of democracy, siding with Hong Kong’s protesters against Beijing’s rapid encroachment into the territory and offering to share with the world its successes against the novel coronavirus, which began in China.

Although the United States’ formal diplomatic relations are with China, it has close ties with Taiwan and has been helping it strengthen its military so that it can stand up to Beijing. The Trump administration last year agreed to sell new F-16 fighter jets worth $8 billion to Taiwan, the largest and most significant sale of weaponry to the island in decades.

The administration also has lent moral support to Taiwan, most recently when deputy national security adviser Matthew Pottinger recorded a video, in Mandarin Chinese, congratulating Tsai on her inauguration and praising Taiwan’s democracy.

Tsai and her democratically elected government have been hailed by the international community for their handling of the covid-19 outbreak, which has claimed only seven lives in Taiwan out of a population of 24 million.

Those moves have incensed Beijing, which had Taiwan stripped of its observer status at the WHO after Tsai’s election in 2016. She began her second term this month after her Democratic Progressive Party won presidential and legislative elections in a landslide in January.

Seeking to highlight Taiwan’s political differences with China in particularly biting fashion, Tsai on Friday visited Causeway Bay Books in Taipei, a bookstore run by Lam Wing-kee. Lam formerly operated the store in Hong Kong, specializing in salacious titles about China’s leaders, and was abducted in 2015, probably by Chinese agents. After his release, he fled Hong Kong and reopened his store in the Taiwanese capital last year.

“Free Taiwan supports the liberty of Hong Kong,” Tsai wrote in a note that she left in the store.

After Beijing’s decision Thursday to press ahead with the national security law, Tsai said Taiwan would welcome freedom-loving Hong Kongers.

“We will continue to support Hong Kong people’s determination to strive for democracy and freedom, because Hong Kong’s democracy and freedom are important factors for regional peace and stability,” Tsai wrote in a Facebook post.

Taiwan’s legislature would develop a “complete and clear” humanitarian assistance plan to allow Hong Kong people to resettle in Taiwan, she said.

Since regaining sovereignty over Hong Kong in 1997, China has governed the financial center under the “one country, two systems” framework, designed to afford the city a high degree of autonomy.

Beijing has long hoped to extend that model to Taiwan. But the Communist Party’s encroachment into Hong Kong, especially its sometimes-violent crackdowns on pro-democracy demonstrators, has confirmed to Taiwan’s “born independent” generation that they do not want to be part of the People’s Republic of China.

Lyric Li, Liu Yang and Wang Yuan in Beijing contributed to this report.