BEIJING (Reuters) - The United States needs to brush up on its history about the South China Sea, as World War Two-related agreements mandated that all Chinese territories taken by Japan had to be returned to China, Chinese Foreign Minister Wang Yi said in Australia.

FILE PHOTO - Chinese dredging vessels are purportedly seen in the waters around Mischief Reef in the disputed Spratly Islands in the South China Sea in this still image from video taken by a P-8A Poseidon surveillance aircraft provided by the United States Navy May 21, 2015. U.S. Navy/Handout via Reuters/File Photo

China has been upset by previous comments from the new U.S. administration about the disputed waterway.

In his Senate confirmation hearing, Secretary of State Rex Tillerson said China should not be allowed access to islands it has built there. The White House also vowed to defend “international territories” in the strategic waterway.

However, last week U.S. Defense Secretary Jim Mattis suggested that diplomacy should be the priority in the South China Sea.

In comments carried on the foreign ministry’s website late on Tuesday, Wang said he had a “suggestion” for this American friends. “Brush up on the history of World War Two,” Wang was quoted as saying during a visit to Canberra, Australia.

The 1943 Cairo Declaration and 1945 Potsdam Declaration clearly state that Japan had to return to China all Chinese territory taken by Japan, Wang said.

“This includes the Nansha Islands,” he added, using China’s name for the Spratly Islands.

“In 1946, the then-Chinese government with help from the United States openly and in accordance with the law took back the Nansha Islands and reefs that Japan had occupied, and resumed exercising sovereignty,” Wang said.

“Afterwards, certain countries around China used illegal methods to occupy some of the Nansha islands and reefs, and it’s this that created the so-called South China Sea dispute.”

China is committed to having talks with the parties directly involved, and in accordance with historical facts and international law to peacefully resolve the issue, and that position will not change, Wang said.

Countries outside the region should support the efforts of China and others in the region to maintain the peace and stability of the South China Sea, and not do the opposite, he added.

China sets great store on Mattis’ comments stressing diplomatic efforts in the South China Sea, as this is not only the position set by China and Southeast Asia but also the “correct choice” for countries outside the region, Wang said.

China claims most of the South China Sea, while Taiwan, Malaysia, Vietnam, the Philippines and Brunei claim parts of the waters that command strategic sea lanes and have rich fishing grounds along with oil and gas deposits.