A military option is on the table, the defense chief says, but sanctions are main cudgel for reining in Pyongyang for now.

NATIONAL HARBOR, MD - SEPhTEMBER 20: Secretary of Defense Jim Mattis (L), shakes hands with Air Force Chief of Staff, Gen. David L. Goldfein before delivering the keynote address at the Air Force Association 2017 Air, Space and Cyber Conference, at the Gaylord National Resort and Convention Center on September 20, 2017 in National Harbor, Maryland. (Photo by Mark Wilson/Getty Images)

One day after President Donald Trump threatened to “totally destroy” North Korea during his first speech to the United Nations, Defense Secretary James Mattis insisted that Washington is still looking for a diplomatic solution.

“It is still a diplomatically-led effort,” Mattis said, highlighting sanctions recently put in place by the U.N. Security Council, as well as the efforts of Secretary of State Rex Tillerson. But Mattis also echoed other senior administration officials who have underscored military options to deal with Pyongyang’s missile and nuclear tests.

“At this time we must also recognize the somber reality that military options must be available in order to protect our allies and ourselves,” said Mattis, who spoke at an annual Air Force conference near Washington. He also stressed the importance of global alliances: “Nations with allies thrive, and those without allies decline,” he said.

Mattis’s comments came on the heels of Trump’s much-anticipated inaugural speech to the U.N., in which he railed against the post-war international order the United States built and launched a verbal assault on countries from North Korea to Venezuela to Iran, potentially alienating many partners and allies needed to rein in Pyongyang’s weapons programs.

Since taking office in January, Mattis has often made a point of softening Trump’s rhetoric or expressing contrary views to those of his boss. He flew to Europe in the early days of the administration to reassure NATO allies of Washington’s commitment to the alliance, and more recently told deployed troops, in what was widely considered a rebuke of Trump’s divisive rhetoric, they need to “hold the line until our country gets back to understanding and respecting each other.”

In the wake of the U.N. speech, in which Trump additionally hinted that he will tear up the 2015 nuclear deal with Iran, Mattis was left with the unenviable task of reassuring nervous allies in Asia and Europe about the administration’s intentions in North Korea and how it might deal with Iran if it again pursues a nuclear weapon.

Separately, Mattis also attempted to scale back expectations for a tidy outcome to the 16-year U.S. war in Afghanistan. He declined to predict the ultimate defeat of the Taliban, and instead said the United States hopes Kabul can eventually handle its own security, with U.S. and other foreign military advisers there “for years to come.”

Earlier this week, Mattis signed the first orders to send about 3,000 more U.S. troops to the country, the latest mini-surge meant to claw back gains made by Islamist insurgents. By year’s end, there will be about 14,000 U.S. troops in the country, the most since 2014.