BEIJING (Reuters) - China should prepare for military action over self-ruled Taiwan and pressure Washington over cooperation on North Korea after the United States passed a law to boost ties with Taiwan, a widely read Chinese state-run newspaper said on Thursday.

FILE PHOTO: Members of the National Security Bureau take part in a drill next to a national flag at its headquarters in Taipei, Taiwan, November 13, 2015. REUTERS/Pichi Chuang

Beijing was infuriated when U.S. President Donald Trump signed legislation last week that encourages the United States to send senior officials to Taiwan to meet Taiwanese counterparts and vice versa.

Beijing has also been upset by Trump’s threats to impose trade restrictions on China over its huge trade surplus with the United States.

U.S. Deputy Assistant Secretary of State Alex Wong said in Taipei on Wednesday the United States’ commitment to Taiwan has never been stronger.

China claims Taiwan as its own and considers the self-ruled island a wayward province, which Chinese President Xi Jinping said on Tuesday would face the “punishment of history” for any attempt at separatism.

The Global Times said in an editorial China had to “strike back” against the U.S. law, for example by pressuring the United States in other areas of bilateral cooperation, like over North Korea and Iran.

“The mainland must also prepare itself for a direct military clash in the Taiwan Straits. It needs to make clear that escalation of U.S.-Taiwan official exchanges will bring serious consequences to Taiwan,” said the paper, which is published by the ruling Communist Party’s official People’s Daily.

“This newspaper has suggested that the mainland can send military planes and warships across the Taiwan Straits middle line. This can be implemented gradually depending on the cross-Straits situation,” it said.

Taiwan is one of China’s most sensitive issues and a potential military flashpoint. Underlining that threat, Taiwan sent ships and an aircraft on Wednesday to shadow a Chinese aircraft carrier group through the narrow Taiwan Strait, its defence ministry said.

Responding to requests for comment on the Global Times article and the carrier movement, a spokesman for the U.S. State Department said: “We oppose unilateral actions by either side to alter the status quo across the Strait.”

“The United States has a deep and abiding interest in cross-Strait peace and stability,” Justin Higgins added. “We welcome steps by both sides of the Taiwan Strait to reduce tensions and improve cross-Strait relations.”

Underscoring China’s concerns, Taiwan’s government and the de facto U.S. embassy on the island said a second senior U.S. official would be visiting Taiwan this week, Deputy Assistant Secretary of Commerce for Manufacturing Ian Steff.

In Washington on Wednesday, the mayor of the Taiwanese city of Kaohsiung, Chen Chu, met with Susan Thornton, the U.S. State Department’s senior diplomat for East Asia, Taiwan’s representative office in Washington said.

Chen is a key ally of Taiwanese President Tsai Ing-wen, and a fellow member of the pro-independence Democratic Progressive Party.

In Beijing, foreign ministry spokeswoman Hua Chunying reiterated China’s opposition to official U.S.-Taiwan contacts, urging people to reread Xi’s comments from earlier in the week.

“The Chinese people share a common belief that it is never allowed, and it is absolutely impossible, to separate any inch of our great country’s territory from China,” Hua said, quoting Xi.

China’s hostility towards Taiwan has risen since Tsai’s 2016 election.

China suspects she wants to push for formal independence, which would cross a red line for Communist Party leaders in Beijing, though Tsai has said she wants to maintain the status quo and is committed to ensuring peace.