“What’s so ironic is that it came on the first anniversary of Donald Trump’s presidency on Saturday, a slap in the face for the leadership in Washington,” China’s Xinhua News Agency said in a commentary by Xinhua writer Liu Chang.

The commentary said that the Trump administration had “backtracked” on policies supported by his predecessor, Barack Obama, including the Trans-Pacific Partnership trade agreement and U.S. participation in the Paris climate agreement.

“If there was any legacy that has survived the transfer of power, it was the spirit of non-cooperation across party lines,” the Xinhua commentary said.

The statement comes after China said Saturday it was to take “necessary measures” to protect its sovereignty after after a U.S. navy destroyer sailed near a disputed shoal claimed by Beijing in the South China Sea this week.

China’s foreign ministry said the missile destroyer USS Hopper came within 12 nautical miles – an internationally recognised territorial limit – of Huangyan Island, which is also known as Scarborough Shoal and subject to a rival claim by the Philippines.

Two U.S. officials, who spoke on condition of anonymity, said the patrol was in line with international law and was an “innocent passage”, in which a warship effectively recognises a territorial sea by crossing it quickly, without stopping.

At a twice-a-decade congress of China’s ruling Communist Party in October, President Xi Jinping was anointed for a second term as party chief, strengthening his grip on power.