China warned Washington not to "play with fire" on Wednesday as a US delegation wrapped up a historic trip to Taiwan.
Beijing has been infuriated by the highest-profile visit in decades to Taiwan, as China-US relations plunge to a record low over a range of issues from trade to military and the coronavirus pandemic.
US health chief Alex Azar finished his visit to Taiwan, during which he criticised Beijing's handling of the pandemic and visited the shrine of former Taiwan president Lee Teng-hui.
Beijing slammed the visit on Wednesday and said it "firmly opposes official exchanges between the US and Taiwan under any pretext".
"On issues involving China's core interests, some people in the US must not harbour illusions, those who play with fire will get burned," said foreign ministry spokesman Zhao Lijian at a regular press briefing.
"I would also like to remind the Taiwan authorities not to be... subservient to others, to rely on the support of foreigners, and to be bent on pursuing independence, which is a dead end," Zhao said.
On the last day of the trip, Azar visited a shrine to the late president Lee, praising his role in steering the island's transition to democracy.
The US cabinet member wrote a message of condolence for Lee, who died last month aged 97.
"President Lee's democratic legacy will forever propel the US-Taiwan relationship forward," Azar wrote.
Both Washington and Taipei have portrayed Azar's trip as an opportunity to learn from the success of Taiwan's battle against the coronavirus.
The island has fewer than 500 infections and just seven deaths, compared with more than 160,000 fatalities in the US.
But the visit has also been an opportunity to ruffle Beijing's feathers at a time when US President Donald Trump is taking an increasingly hard line against China as he seeks re-election in November. (AFP)