Joko Widodo
Indonesian President Joko Widodo is greeted by Japan's Emperor Akihito in Tokyo Reuters

Indonesian President Joko Widodo has said China's claim to much of the South China Sea has no foundation in international law, according to a report in a Japanese newspaper.

Beijing claims the vast majority of the South China Sea, which is thought to be rich in resources such as oil and gas. The Chinese claim overlaps with several others, including those of Brunei, Malaysia, the Philippines, Vietnam and Taiwan.

The territorial dispute has been a long-running source of tension that led to outbreaks of violence in 2014, after Vietnamese and Chinese ships clashed over a Chinese oil rig that began operating in disputed waters.

Indonesia's president is set to visit China and Japan for the first time since he was elected leader in October last year.

"We need peace and stability in the Asia-Pacific region. It is important to have political and security stability to build up our economic growth," Widodo told the Yomiuri newspaper, published in English on Monday (23 March).

"So we support the Code of Conduct and also dialogue between China and Japan, China and Asean."

In a Japanese language version of the interview published in the same newspaper, Widodo was quoted as saying "the 'nine-dashed line' that China says marks its maritime border has no basis in any international law."

Widodo's foreign policy adviser Rizal Sukma told Reuters that the Indonesian president was not referring to China's overall claim, just the so-called nine-dash line that overlaps with other countries' claims.

While Indonesia does not have claims of its own in the South China Sea, it has frequently acted as a broker in territorial disputes in the region in the past.