Former Defense Secretary James Mattis disagreed with a senior administration official's decision to publish an anonymous op-ed critical of the president in 2018, saying he would have put his name on something like that.

"I've never believed in cowardice," he told MSNBC's "Morning Joe" on Wednesday. "If I felt that strongly about something, I would have signed it -- I would have been right up front about it. I think you would owe that degree of candor."

Mattis' response echoed how the White House criticized the unknown administration official who penned the op-ed in The New York Times. The piece -- titled "I Am Part of the Resistance Inside the Trump Administration" -- contained a scathing indictment of Trump's behavior and moral compass. It also indicated that there was a substantial apparatus within the administration that tried to undermine Trump's agenda.

Mattis said Wednesday that the op-ed was part of a broader problem with the nation's political environment.

FORMER SECRETARY OF DEFENSE MATTIS DETAILS FRUSTRATIONS WITH OBAMA, BIDEN

"I think, too, we have to look at this as a test of everyone's character in America. Again, I don't think we have a problem today that suddenly mushroomed into our observation and what we're seeing here in the last six months, last two years, or last five years," he said.

"I think this is a growing problem inside America. We've lost the fundamental friendliness with one another, we've lost a sense of fairness," he added.

His comments were the latest in a series Mattis made with the release of his new book "Call Sign Chaos."

Mattis has described Trump as an "unusual" president but also a "forthright man" whom he met with weekly while in the administration. In an interview with CBS, Mattis refused to speak ill of the president, noting the "rabid nature of politics today."

Mattis also revealed that he hasn't spoken with the president since resigning late last year. During his time in the administration, rumors swirled around Washington that Mattis had sometimes clashed with Trump.

GENERAL MATTIS SAYS RELATIONSHIP WITH TRUMP 'WAS NOT TENSE'

Recent reports like the CBS one -- his first televised interview since leaving -- appear to offer some insight into the president's disagreements with his chief military adviser.

Mattis' departure in 2018 prompted speculation, since it occurred just after the president announced he would withdraw from Syria.

Mattis reportedly saw the decision as betraying America's allies. "This is how I saw the strength of America, that we keep our alliances together and we keep them tight," Mattis reportedly said. "And if I wasn't the right person to do this, the president needed someone more aligned with his views."

News of those comments came just a day after The Atlantic reported that Mattis told Trump that he would lose the war against ISIS. “You’re going to have to get the next secretary of defense to lose to ISIS. I’m not going to do it," he reportedly said.

CLICK HERE TO GET THE FOX NEWS APP

During an interview with Fox News host Martha MacCallum, the longtime public servant discussed his dispute with the prior administration about pulling U.S. troops out of Iraq in 2011.

"I think that the administration had made up its mind that we were coming out," Mattis told MacCallum on Tuesday. "They believed the enemy was beaten down far enough that they couldn't rise again, despite what the intelligence community was quite adamant about -- that they would rise again," Mattis said.

Fox News' Victor Garcia contributed to this report.