China said on Sunday that the United States was making political provocations with its patrols in the disputed South China Sea, as tensions around the strategic waterways mount.

China will continue to construct military facilities on artificial islands it is building, Vice Foreign Minister Liu Zhenmin told a news conference in Kuala Lumpur. The facilities are needed to protect the islands, he said.

Washington was testing Beijing with its insistence on "freedom of navigation" in the strategic waterway, he said.

China, which claims almost the entire energy-rich South China Sea, has been transforming reefs into artificial islands in the Spratly archipelago and building airfields and other facilities on some of them. That has prompted concerns in Washington and across the region that Beijing is trying to militarize its claims in the South China Sea.

Earlier this month, U.S. B-52 bombers flew near some of the artificial islands, signaling Washington's determination to challenge Beijing's claim. At the end of October, the USS Lassen, a guided-missile destroyer, challenged territorial limits around one of the islands.

"This time, in a very high profile manner, the U.S. sent military vessels within 12 nautical miles of China's islands and reefs," Liu said. "This has gone beyond the scope of freedom of navigation. It is a political provocation and the purpose is to test China's response."

Obama on Saturday had called on countries to stop building artificial islands and militarizing their claims and said the United States would continue to assert its freedom of navigation rights in the sea.

Vietnam, the Philippines, Malaysia, Taiwan and Brunei also have territorial claims in the South China Sea.

"For the sake of regional stability the claimants should halt reclamation, construction and militarisation of disputed areas," Obama told a meeting on Saturday between the United States and leaders of the 10 Asean nations.

China has been transforming reefs in the Spratly archipelago into artificial islands and has built airfields and other facilities on them. This has caused ripples of alarm in much of East Asia about China's intentions and freedom of navigation in a waterway through which $5 trillion in ship-borne trade passes annually.

Obama said he commended Asean for working to create a code of conduct for the South China Sea "including the peaceful resolution of disputes, freedom of navigation and freedom of overflight."