SINGAPORE (Reuters) - The United States is encouraged by China’s efforts to restrain North Korea but Washington will not accept Beijing’s militarization of islands in the South China Sea, U.S. Defense Secretary Jim Mattis said on Saturday.

The comments by Mattis, during the annual Shangri-La Dialogue, show how U.S. President Donald Trump’s administration is looking to balance working with China to restrain North Korea’s advancing missile and nuclear programs while dealing with Beijing’s activities in the South China Sea.

U.S. allies have been worried by Trump’s actively courting Chinese President Xi Jinping to restrain North Korea, fearing Washington might allow China a more free rein elsewhere in the region.

Some allies have also expressed concern that Washington’s withdrawal from the Trans-Pacific trade partnership and the Paris global climate accord signals the United States is diluting its global leadership role.

Speaking at the dialogue, Asia’s premier security forum, Mattis said the United States remained fully engaged with its partners.

“Like it or not, we are a part of the world...What a crummy world if we all retreat inside our borders,” he said.

“Once we have exhausted all possible alternatives, the Americans will do the right thing,” Mattis added, paraphrasing a quotation by British wartime leader Winston Churchill. “So we will still be there and we will be there with you.”

Nevertheless, reversing or slowing North Korea’s nuclear and missile programs has become a security priority for Washington, given Pyongyang’s vow to develop a nuclear-tipped missile capable of hitting the U.S. mainland.

The Trump administration has been pressing China aggressively to rein in its reclusive neighbor, warning all options are on the table if North Korea persists with its weapons programs.

“The Trump administration is encouraged by China’s renewed commitment to work with the international community toward denuclearization,” Mattis said.

“Ultimately, we believe China will come to recognize North Korea as a strategic liability, not an asset.”

However, Mattis said seeking China’s cooperation on North Korea did not mean Washington would not challenge Beijing’s activities in the South China Sea.

The U.N. Security Council on Friday expanded targeted sanctions against North Korea after its repeated missile tests, adopting the first such resolution agreed by the United States and China since Trump took office.

In another sign of increased pressure on North Korea, Japan’s navy and air force began a three-day military exercise with two U.S. aircraft carriers in the Sea of Japan on Thursday.

Japanese Defense Minister Tomomi Inada, speaking at the Singapore forum, said Tokyo backed the United States using any option to deal with North Korea, including military strikes, and was seeking a deeper alliance with Washington.

But she also said she was concerned about the situation in the South China Sea and in the East China Sea.

China’s claims in the South China Sea, through which about $5 trillion in ship-borne trade passes each year, are contested by Brunei, Malaysia, the Philippines, Taiwan and Vietnam. China and Japan both claim islands in the East China Sea.

Slideshow ( 5 images )

LOW-KEY

China, which sent only a low-key delegation to the forum,

said its ties with the United States were vital for the region.

“I believe that if China and the United States can ensure no conflict, as well as maintain mutual respect, cooperation and trust, it will contribute greatly to security in the Asia Pacific and the world,” Lt Gen He Lei, the head of Beijing’s delegation, told reporters.

Slideshow ( 5 images )

Allies around the world have been concerned about the commitment of the United States since Trump took office on Jan. 20 because of his “America First” rhetoric and expectations that he would concentrate on a domestic agenda.

“We are still trying to figure out his (Trump’s) policy in our region,” said Malaysian Defense Minister Hishammuddin Hussein. “I would like to know very clearly what are the true intentions of the new administration.”

Mattis sought to ease concerns for allies in the Asia-Pacific, saying the region was a priority and the primary effort was alliance building. He added, however, that countries must “contribute sufficiently to their own security.”

In a sign of the U.S. commitment to the region, Mattis said that soon about 60 percent of overseas tactical aviation assets would be assigned to the region and he would work with the U.S. Congress on an Asia-Pacific stability initiative.

Mattis said the United States welcomed China’s economic development, but he anticipated “friction” between the two countries.

“While competition between the U.S. and China, the world’s two largest economies, is bound to occur, conflict is not inevitable,” Mattis said.

While eager to work with China in dealing with North Korea, Mattis said the United States did not accept China placing weapons and other military assets on man-made islands in the South China Sea.

“We oppose countries militarizing artificial islands and enforcing excessive maritime claims,” Mattis said. “We cannot and will not accept unilateral, coercive changes to the status quo.”