Secretary of Defense James Mattis concluded his visit to Japan this weekend with a glowing statement praising Tokyo as a “model of cost-sharing” on defense, while warning China that the United States will not hesitate to defend Japan’s East China Sea islands should Beijing make a move to colonize them.

The Japanese newspaper Asahi Shimbun reports that Japanese officials were “taken by surprise” at how positive Mattis’ comments were regarding the military relationship between Japan and the United States. “I believe that Japan has been a model of cost sharing, of burden sharing,” Mattis said on Saturday. “We have constant dialogue about this. We’ve worked through the details. But we can point to our Japanese-American cost sharing approach as an example for other nations to follow.”

Asahi notes that Japan pays for 74.5 percent of the costs of its defense, significantly more than other post-World War II allies like Germany and Italy.

Speaking alongside his Japanese counterpart, Defense Minister Tomomi Inada, Mattis also had stern words for China. “I made clear that our long-standing policy on the Senkaku Islands stands – the US will continue to recognize Japanese administration of the islands and as such Article 5 of the US-Japan Security Treaty applies,” Mattis noted, referring to the part of the bilateral treaty that requires the United States to defend Japanese territory with its own military might if attacked.

Mattis’s remarks Saturday followed a full endorsement from Prime Minister Shinzo Abe. “I was very encouraged to see someone like you who has substantial experience, both in the military and in security, defense and diplomacy, taking this office,” Abe said of Mattis on Friday. Mattis, in turn, said during that meeting that the United States stood “firmly, 100 percent, shoulder-to-shoulder with you and (the) Japanese people.”

The Senkaku Islands lie in the East China Sea. The Communist Party controlling Beijing claims them as its own, calling them the Diaoyu, and placed an Air Defense Identification Zone (ADIZ) over them in 2013. The zone essentially requires Japanese aircraft to identify themselves to the Chinese government when flying over Japanese sovereign territory. Following President Obama’s evocation of Article 5 in 2014, China ceased to enforce the ADIZ.

CNN reports that the Chinese Foreign Ministry was quick to respond to Mattis’ reminder that the Senkaku Islands are Japanese. “Diaoyu and its affiliated islands have been Chinese territory since ancient times,” spokesman Lu Kang told reporters in a statement. “We urge the US side to adopt a responsible attitude and stop making wrong remarks on the issue of the sovereignty of Diaoyu Islands.”

Mattis’ criticism of China did not end with its belligerence in the East China Sea, however. “From the threat of nuclear missile provocations by North Korea, to increasingly confrontational behavior by China in the East and South China Sea, we recognize the changing security situation,” he said in the same press conference with Minister Inada. “We have watched, in the South China Sea, as China has shredded the trust of nations in the region, apparently trying to have a veto authority over the diplomatic and security and economic conditions of the neighboring states.”

In the South China Sea, China claims the sovereign territory of Taiwan, Brunei, the Philippines, Vietnam, Malaysia, and Indonesia. While Japan does not have a claim in the region, its leaders have expressed concern that China’s illegal construction of artificial islands and placement of military assets there threaten the stability of the entire region.

In response, the Chinese government, through its official media outlets, has accused Mattis himself of “add[ing] uncertainty to the region.” The often more combative state newspaper Global Times accused Mattis of laying the groundwork for a war between North and South Korea during his short stay in Seoul last week.