Kuala Lumpur (AFP) - US Defense Secretary Ashton Carter on Tuesday told his Chinese counterpart Chang Wanquan that the American military would continue to operate in the South China Sea.

With tensions still simmering after a US naval vessel sailed close to artificial islands China is building in the disputed waters, the pair met for about 40 minutes on the sidelines of a regional defence meeting.

"(Carter) once again reaffirmed that the United States will continue to fly, sail and operate wherever international law allows," a senior US defence official said after the two defence chiefs met in Kuala Lumpur.

"And he clearly made the case that the South China Sea would not be an exception."

Carter's comments came hours after his top US admiral in the Pacific region, Harry Harris, gave a speech in Beijing in which he told China that the US military would continue to sail "wherever" international law allows.

Carter also discussed Washington's concerns over alleged Chinese cyber-attacks.

In a meeting that was "business-like and cordial", Chang reiterated Beijing's position that the islets are sovereign Chinese territory and its displeasure with the guided missile destroyer USS Lassen's presence.

The ship last week sailed within 12 nautical miles of at least one of the land formations China claims in the disputed Spratly Islands.

"They made it clear that they don't like these measures," a second defence official said. "But there was none of the fiery rhetoric that you may have seen in media from other officials."

The officials said China described a "bottom line", below which it would defend the islands.

But Carter and the US delegation saw this as open to interpretation and not an ultimatum that would deter future US sailings in the contested region.

Their talks took place in Kuala Lumpur at a meeting for defence ministers from the 10-country Association of Southeast Asian Nations (ASEAN).

The ASEAN defence chiefs are to formally sit down Wednesday with Carter, Chang and their counterparts from Russia, Australia and elsewhere in the region as part of a broader annual dialogue.

Story continues

Carter's Malaysia visit is part of an eight-day trip to the Asia-Pacific region.

- Asia-Pacific 'rebalance' -

Officially, Carter's mission is intended to help push the next phase of Washington's foreign policy "rebalance" to the region.

But a recurrent theme of the trip has been China's construction of artificial islands.

In Beijing, Harris's speech at the Stanford Center at Peking University provoked an angry reaction.

Chinese officials rebuked Harris, who heads the US Pacific Command, with the People's Liberation Army chief of general staff Fang Fenghui telling him it had "created a disharmonious atmosphere for our meeting and this is very regretful".

Foreign ministry spokeswoman Hua Chunying said Washington's call for Beijing to stop militarising the South China Sea while itself sending warships was "a typical manifestation of hypocrisy and hegemonism."

Washington says it takes no position on sovereignty disputes in the region and the sail-by was intended to protect freedom of navigation under international law, which it sees as potentially threatened by China's activities.

Beijing claims sovereignty over almost the whole of the South China Sea on the basis of a segmented line that first appeared on Chinese maps in the 1940s.

The Philippines, Vietnam, Malaysia, Brunei and Taiwan also have overlapping claims in the sea.

Washington has repeatedly said it does not recognise Beijing's claims to territorial zones around the artificial islands it has built.

The contretemps comes as the world's two largest military powers work to keep their cool over the troubled waters.

However, conciliatory gestures were tucked behind the rhetoric. Carter accepted an invitation to visit Beijing in the spring, and Harris praised US-China ties.

Carter and Chang also noted the importance of military-to-military dialogue.

Two days after the USS Lassen's voyage, the chief of US naval operations spoke with his Chinese counterpart via video.

US officials said the call between Admiral John Richardson and Admiral Wu Shengli, who commands the Chinese navy, was "professional and productive".

But China's official Xinhua news agency paraphrased Wu as warning his counterpart of the risk of "a serious situation between frontline forces... or even a minor incident that could spark conflict".

Beijing's response to the USS Lassen sailing appears to have been carefully calibrated, with authorities expressing outrage, summoning US ambassador Max Baucus to protest, and saying they monitored and warned away the vessel -- but without physically intervening.

China's position on the islands is leading many countries in the region "to want to intensify their security cooperation with the United States", Carter said on Sunday.