TOKYO — The United States is ready to use the “full range” of its military capabilities to deal with North Korea, the chairman of the Joint Chiefs of Staff told South Korean leaders Monday, amid widening pressures on the regime of Kim Jong Un.

But Gen. Joseph Dunford, speaking in Seoul, just 30 miles south of the border with North Korea, stressed that diplomacy and sanctions were the first plan.

“The military dimension today is directly in support of that diplomatic and economic effort,” Dunford said after meeting with South Korean President Moon Jae-in.

“It would be a horrible thing were a war to be conducted here on the peninsula, and that’s why we’re so focused on coming up with a peaceful way ahead,” he said, according to Stars and Stripes.

“Nobody’s looking for war,” the Marine general said, according to the newspaper. But he added that the military’s job was to provide “viable military options in the event that deterrence fails.”

Defense Secretary Jim Mattis said Monday in Washington that it will be “game on” with North Korea if it hits the United States, including Guam, but he left it much more ambiguous what will happen if Pyongyang decides to shoot missiles near Guam, without trying to actually hit the U.S. island territory.

“That becomes an issue that we take up, and it’s however the president chooses,” Mattis said. “You can’t make all of those kinds of decisions in advance. There is a host of things going on. There are allies we consult with, as the president made very clear last week when we talked about our allies repeatedly in his statement.”

Mattis added that he needs a “certain amount of ambiguity on this, because I’m not going to tell (Kim) what I’m going to do in each case.”