TOKYO -- U.S. Defense Secretary Jim Mattis on Friday reassured two key U.S. treaty allies, South Korea and Japan, that President Donald Trump, who has raised doubts about the value of such partnerships, is fully committed to defending them.

“I want there to be no misunderstanding during the transition in Washington that we stand firmly, 100 percent shoulder-to-shoulder with you and the Japanese people,” Mattis told Japanese Prime Minister Shinzo Abe.

Earlier in the day, in Seoul, with his South Korean counterpart, Han Min Koo, at his side, Mattis said, “the United States stands by its commitments, and we stand with our allies, the South Korean people.” He also explicitly warned North Korea against using a nuclear weapon, saying such an act would be met with a response that is “effective and overwhelming.”

Get Breaking News Delivered to Your Inbox

These were the only two stops on Mattis’s first overseas trip since taking office Jan. 20. He said he chose to go to Japan and South Korea first in order to demonstrate that nothing will weaken the U.S. security promises.

During the last year’s U.S. presidential campaign, Mr. Trump complained that defense treaties disadvantaged the U.S. and that he would not rule out abandoning signatories, including Japan, if they refuse to pay more for their defense. He also suggested that South Korea and Japan, which are already within the range of North Korean missiles, might acquire their own nuclear weapons rather than rely on U.S. deterrence.

In Seoul on Friday, Mattis was firm in stating that Washington will not waver in the face of defiant progress by North Korea toward developing a ballistic missile capable of carrying a nuclear warhead and hitting the U.S.

“North Korea continues to launch missiles, develop its nuclear weapons program, and engage in threatening rhetoric and behavior,” Mattis said.

“We stand with our peace-loving Republic of Korea ally to maintain stability on the peninsula and in the region,” he added. “America’s commitments to defending our allies and to upholding our extended deterrence guarantees remain ironclad: Any attack on the United States, or our allies, will be defeated, and any use of nuclear weapons would be met with a response that would be effective and overwhelming.”

U.S. defense secretaries have long offered assurances to South Korea and Japan that the American nuclear “umbrella” will protect them, but Mattis’s statement in Seoul was perhaps more pointed than some.

The U.S. has 28,500 troops in South Korean and about 50,000 in Japan, including on the island of Okinawa, where Mattis served as a young Marine officer in the early 1970s.

Throughout his time in Seoul and Tokyo, Mattis repeated his criticisms of North Korea and stressed that the Trump administration is committed to carrying through on a deal the Obama administration reached with the Seoul government last year to deploy a high-end U.S. missile defense system to South Korea this year.

The Terminal High-Altitude Area Defense, or THAAD, is meant to improve protection of South Korea and Japan - as well as U.S. troops stationed in both countries - against a North Korean missile attack. Mattis said the deployment will go forward, despite its political sensitivity in Seoul, which faces possible presidential elections soon. He called it an example of “defensive steps” the United States is taking in response to Pyongyang’s “threatening rhetoric and destabilizing behavior.”

The current South Korean government supports THAAD deployment, but China has pushed hard to change that.

On Friday, Chinese Foreign Ministry spokesman Lu Kang reiterated China’s opposition to THAAD at a regularly scheduled briefing.

“We have resolute opposition to the deployment of THAAD to South Korea by the U.S. and ROK, which remains unchanged and will not change,” the statement said, using initials for the Republic of Korea. “Such actions by the U.S. and ROK will jeopardize security and the strategic interests of regional countries, including China, and undermine the strategic balance in the region.”

In his remarks Friday, the South Korean defense chief, Han, echoed Mattis’s concern about North Korea’s nuclear and missile programs. He said they “blatantly threaten” the international community and have created a “severe security situation” on the Korean peninsula. He described Mattis’s visit so early in his tenure as a warning to North Korea.

The Trump administration is reviewing the U.S. approach to North Korea, along with other aspects of U.S. defense and foreign policy. Mattis has said he would consult with South Korean and Japanese officials about whether the current strategy for getting the North to curtail or eliminate its nuclear and missile programs was adequate. North Korea has said it was nearly ready to test-launch a ballistic missile of intercontinental range, meaning it could theoretically threat the United States.