KUALA LUMPUR (Reuters) - China said on Sunday it will continue to build military and civilian facilities on its artificial islands in the disputed South China Sea and the United States was testing it by sending warships through the area.

U.S. President Barack Obama walks behind China's Premier Li Keqiang as they attend a family photo at the 27th Association of Southeast Asian Nations (ASEAN) Summit in Kuala Lumpur, Malaysia, November 22, 2015. REUTERS/Jorge Silva - RTX1V8HA

“Building and maintaining necessary military facilities, this is what is required for China’s national defense and for the protection of those islands and reefs,” Vice Foreign Minister Liu Zhenmin told a news conference in Kuala Lumpur.

China planned to “expand and upgrade” the civilian facilities on the islands “to better serve commercial ships, fishermen, to help distressed vessels and provide more public services”, Liu said, adding that China rejects the notion that it is militarizing the South China Sea. He said China has mostly built civilian facilities.

Liu’s comments at the annual East Asia Summit, this year hosted by Kuala Lumpur, were some of the most forceful explanations that China has given regarding its position on the South China Sea.

Washington was testing Beijing with its insistence on “freedom of navigation” patrols in the strategic waterway, Liu 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 islands, signaling Washington’s determination to challenge Beijing’s claim. At the end of October, the USS Lassen, a guided-missile destroyer, sailed around one of them.

“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.

CONFRONT ISLAMIST EXTREMISTS

Leaders from 18 countries including the United States, China, India, Russia, Japan and Southeast Asia who gathered for the summit issued strong calls for action after a recent spate of attacks by Islamic State in Paris, Mali and Lebanon.

U.N. Secretary-General Ban Ki-moon urged Russia and the United States on Sunday to cooperate in rooting out terrorism and said he would unveil a comprehensive plan to fight extremism and violence early next year.

“We need to show global solidarity to address ... the common enemy of ISIL, Daesh, some other extremists and terrorist groups,” he said, referring to Islamic State.

Obama told a news conference at the end of the summit the United States and its allies would not relent in the fight to combat Islamic State extremists and would hunt down their leaders and cut off the group’s financing.

“Destroying (Islamic State) is not only a realistic goal, we’re going to get it done,” Obama said. “We will destroy them. We will take back land they are currently in, take out their financing, hunt down leadership, dismantle their networks, supply lines and we will destroy them.”

Obama said it “would be helpful” if Russia directed its focus on tackling Islamic State and he hoped Moscow would agree to a leadership transition in Syria that meant its president stepping down.

Russian Prime Minister Dmitry Medvedev said countries with large populations of Muslims, including Russia, should unite to fight against Islamic State.

Medvedev said “it is now clear we can only fight this threat by bringing our forces together and by working through such international institutions as the United Nations”.

The U.N. Secretary-General said he “highly commended the leadership of the Russian Federation together with the United States to address some of the roots causes of terrorism”.

Ban said the United Nations is now gathering ideas and experience from its member states. “Early next year, the U.N. is going to present a comprehensive plan of action to defeat violence and extremism.”

ECONOMIC COMMUNITY

Before the start of the East Asia Summit, the 10-member Association of Southeast Asian Nations formally established an ASEAN community. It attempts to create freer movement of trade and capital in an area of 625 million people with a combined economic output of $2.6 trillion.

“In practice, we have virtually eliminated tariff barriers between us,” said Najib, the summit host. “Now we have to assure freer movements and removal of barriers that hinder growth and investment.”