The US has urged Japan and China to settle their increasingly angry dispute over islands claimed by both sides.

The US said it was in everyone's interests to have good relations between Asia's two biggest economies.

The mounting tension over ownership of the islands in the East China Sea triggered protests in a number of cities across China at the weekend.

China warned the dispute could hurt Japan's trade with its biggest export market.

China and Japan both claim the islands called Senkaku by Japan and Diaoyu by China, which lie in waters believed to be rich in natural gas.

The intensity of the dispute, which has been dragging on for years, suddenly increased last week after the Japanese government bought some of the islands from a private Japanese owner.

China called that a severe violation of its sovereignty and the dispute has triggered a wave of nationalist anger that the Chinese government has sought to both channel and contain.

Japanese Foreign Minister Koichiro Gemba earlier told reporters that his country and the US agreed that the disputed islands were covered by a US-Japan security treaty.

US Defence Secretary Leon Panetta said that while his government stood by its obligations under the treaty with Japan, it did not take any side over who had sovereignty over the islands.

Some Japanese firms have temporarily shut factories and shops in China after the protests and the Japanese government has warned its citizens about large-scale protests planned for tomorrow in China.

The overseas edition of the People's Daily, the main newspaper of the Chinese Communist Party, warned that China could resort to economic retaliation if the dispute festers, threatening enduring repercussions for Japan.