Defense Secretary Jim Mattis is taking exception to the portrayal of some of his recent comments as putting him at odds with his boss, President Trump.

Mattis on Thursday labeled as "ludicrous" the suggestion that his comments to U.S. troops telling them to "hold the line," or his statement that the U.S. "is never out of diplomatic options," in dealing with North Korea were contradicting the president.

Mattis met Wednesday with South Korea's defense minister at the Pentagon and was asked about the president's tweet earlier that morning that "Talking is not the answer!" with North Korea, and whether that meant the U.S. was out of diplomatic options.

"No, we're never out of diplomatic solutions," Mattis said.

Mattis, speaking to reporters on Thursday during an impromptu gathering, seem puzzled that the comment was widely seen as evidence of a break with the president.

"I was asked if there were any diplomatic efforts left, and I said of course," Mattis said. "It didn't contradict anything the president said. We're not talking to the North Koreans right now."

When a reporter said the remark was "widely interpreted" as a contradiction, Mattis said, "It was widely misinterpreted then."

"I can't help people who misinterpret things. I'll do my best to call it like I see it, but right now if I say six and the president says half-a-dozen, they're gonna say I disagree with him."

Mattis also took issue with the characterization of a Facebook video in which he was speaking off the cuff during a visit with U.S. troops in Jordan.

"Our country, right now, it's got problems that we don't have in the military," Mattis told them. "You just hold the line until our country gets back to understanding and respecting each other and showing it."

That, Mattis said, was a theme he said he picked up from listening to Trump's Afghanistan speech a few hours earlier.

In those remarks, the president said, "The young men and women we send to fight our wars abroad deserve to return to a country that is not at war with itself at home. We cannot remain a force for peace in the world if we are not at peace with each other."

Mattis said was he was thinking about that when he was talking to the troops.

"Literally, I'm using the president's thoughts, and they thought that I was distancing from the president, so I mean it shows how ludicrous this really is," he said. "I think this is someone's rather rich imagination."