Indonesia’s President Joko Widodo is backtracking on some comments about China he made during his visit to Japan this week that could have potentially jeopardized Jakarta’s own bilateral relations with Beijing. When it comes to the ongoing territorial dispute in the South China Sea, he said at a press conference in Tokyo Tuesday, “Indonesia is not siding with any party involved in the dispute.”

As Widodo gears up for a visit to China during the second leg of his first trip outside Southeast Asia since assuming office in October, he clarified comments he made in an interview with a Japanese newspaper Sunday, when he said Beijing’s claims to the disputed South China Sea had no basis in international law.

Neither Indonesia nor Japan is currently a claimant of territory in the South China Sea region, but China’s claims there in recent years have put the country at odds with several neighbors, including Vietnam, Taiwan and the Philippines.

During the Indonesian leader’s trip to Japan, Jakarta and Tokyo announced a bilateral defense cooperation deal, with the South China Morning Post in Hong Kong quoting Japanese Prime Minister Shinzo Abe as saying, “A developed Indonesia would contribute even more to the peace and stability of the region and the world.” However, it is conceivable a defense alliance between the two countries could anger China and thus affect budding economic partnerships between Jakarta and Beijing.

Arriving in Beijing Wednesday, Widodo hopes to attract Chinese investment to help improve the Indonesian infrastructure. “We want to focus specifically on infrastructure and manufacturing developments,” he said in an interview with the South China Morning Post. “I hope when I go to China on this trip, we have direct implementation. I don’t want to only sign and sign documents, and then there is no implementation,” he said.

Widodo said Indonesia’s interest in the South China Sea region is only to de-escalate tensions. “If it is necessary, we are also ready to be a good mediator, that is what I was trying to say,” Widodo explained, according to Today in Singapore. During a press conference, Indonesia’s Foreign Affairs Minister Retno Marsudi emphasized that China and Indonesia have no competing claims in the South China Sea: “As the president has said, Indonesia has no overlapping claim whatsoever with China. Please note that.”

The bilateral defense cooperation deal between Indonesia and Japan appears to be the latest move in Tokyo’s plans to undermine Beijing’s dominance in the disputed South China Sea region. This month, Japanese sources acknowledged the country was providing support to Vietnam and the Philippines, China’s two largest geopolitical adversaries in the region.