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 militarise its claims in the South China Sea.
Earlier this month, U.S. B-52 bombers flew near some of the artificial islands, signalling 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 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.
Heads of government from 18 countries including the United States, China, India, Russia, Japan and Southeast Asia are meeting for the annual East Asia Summit, this year hosted by Malaysia.
Many of them came from Manila for the annual meeting of the Asia Pacific Economic Cooperation forum.
The season of summitry has so far been dominated by calls for action over Islamic State's attacks in Paris and Mali, and bombings in Lebanon. Read more: