The law approved by Congress and signed by US President Donald Trump encourages the US to send senior officials to Taiwan to meet Taiwanese counterparts and vice versa.
China's Foreign Ministry on Saturday expressed its "resolute opposition" after US President Donald Trump signed legislation that encourages the United States to send senior officials to Taiwan to meet Taiwanese counterparts and vice versa.
The bill, which is non-binding, would have gone into effect on Saturday morning, even if Trump had not signed it on Friday.
The bill, which was passed by Congress last month, says it should be US policy to allow visits at all levels. High-level Taiwan officials should be permitted to enter the United States "under respectful conditions" to meet US officials, while Taiwanese economic and cultural representatives should be encouraged to conduct business in the United States.
The move adds to strains between the two countries over trade, as Trump has enacted tariffs and called for China to reduce its huge trade imbalance with the United States, even while Washington has leaned on Beijing to help resolve tensions with North Korea.
In a statement, China's Foreign Ministry said it had lodged "stern representations" with the United States, saying the law sent a "seriously wrong signal" to the forces of Taiwan independence.
"We urge the US side to correct its mistake, stop official exchanges between US and Taiwan officials and substantively raising relations, and prudently and appropriately handle the Taiwan issue to avoid causing serious harm to Sino-US ties and peace and stability in the Taiwan Strait region."
China considers self-ruled and democratic Taiwan to be a wayward province ineligible for state-to-state relations.
China's hostility towards Taiwan has risen since the election of President Tsai Ing-wen, of the pro-independence Democratic Progressive Party, in 2016.
It suspects Tsai 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.
Taiwan's government has welcomed the new US legislation, saying it looks forward to continuing to deepen its relationship with Washington.
Taiwan's presidential office said in a statement earlier on Saturday that the United States was Taiwan's most important ally and thanked the country for its steadfast support.
The United States does not have formal ties with Taiwan but is required by law to help it with self-defence and is the island's primary source of weapons.
Douglas Paal, who served as US representative to Taiwan from 2002 to 2006, said the legislation did not change anything real as it was non-binding. US administrations already had discretionary authority to permit visits by senior Taiwanese officials and visits by senior US officials and military officers to Taiwan, he said.
"They don't authorise these trips because the policy judgment is that the costs in relations with China would outweigh the benefits in relations with Taiwan," Paal said.
Defeated Nationalist forces fled to Taiwan in 1949 after losing the Chinese civil war to the Communists.