A screen shows news coverage of an August 29 missile test launch in a public square outside a train station in Pyongyang on Wednesday. (KIM WON-JIN/AFP/Getty Images)

Defense Secretary James Mattis pushed back against Donald Trump's assertion Wednesday morning that "talk was not the answer" with North Korea, telling reporters at the Pentagon, "We're never out of diplomatic solutions."

The Pentagon chief was responding to questions shouted from reporters as he sat down with his South Korean counterpart, two days after North Korea fired a ballistic missile that flew over northern Japan.

"We continue to work together, and the minister and I share responsibility to provide for the protection of our nation, our populations and our interests, which is what we are here to discuss today," Mattis added when asked about new diplomatic solutions. "And look for all the areas we can collaborate – there is already very strong collaboration. We always look for more. We are never complacent."

His comments came hours after Trump tweeted , "The U.S. has been talking to North Korea, and paying them extortion money, for 25 years. Talking is not the answer!"

This is not the first time Trump's top military adviser has stepped in to soften the commander in chief's rhetoric – even on this issue. Trump indicated in July after the first of two North Korean missile tests that month that he was considering pre-emptive military action against the Hermit Kingdom.

In an impromptu gaggle with reporters at the Pentagon shortly afterward, Mattis said, "The president's been very clear, and the secretary of state's been very clear, that we are leading with diplomatic and economic efforts."

"We stand ready to provide options if they are necessary," he added at the time.

