Stay Updated on Developing Stories

How James Mattis and Donald Trump's relationship has changed since the Secretary of Defense left his post

Washington(CNN) Despite claiming he owes the Trump administration a "duty of silence," former Secretary of Defense James Mattis is speaking out about his turbulent tenure at the Pentagon, writing a new book and participating in interviews for the first time since his dramatic resignation eight months ago.

While the retired four-star Marine Corps general has not mentioned President Donald Trump by name, he has implicitly criticized his former commander in chief, with whom he sharply disagreed on matters of international engagement and alliances, in a string of recent public statements and interviews.

He also addresses policy matters as they relate to Trump in his forthcoming book, "Call Sign Chaos: Learning to Lead."

Mattis resigned as Trump's first defense secretary in late December after the President announced plans to withdraw US troops from Syria. Mattis cited irreconcilable policy differences in a letter to Trump that took many in Washington by surprise.

But his latest comments, coupled with the resignation letter he submitted last year, reveal just how difficult the situation had become for Mattis, who had been widely regarded as a pillar of stability within an otherwise chaotic administration.

Those details also offer a glimpse of what Trump's remaining national security officials may be dealing with privately at a time when the US faces a myriad of national security challenges.

'I had no choice but to leave'

In an interview with The Atlantic released Thursday, Mattis defended his decision to resign: "I had no choice but to leave," he said. "That's why (my resignation) letter is in the book. I want people to understand why I couldn't stay."

"I've been informed by four decades of experience, and I just couldn't connect the dots anymore," he added.

Mattis declined to directly address the character of Trump -- with whom he had an openly rocky relationship marked by presidential Twitter insults, and said he owed it to the remaining administration officials to maintain his silence on certain issues.

"If you leave an administration, you owe some silence," he said. "When you leave an administration over clear policy differences, you need to give the people who are still there as much opportunity as possible to defend the country."

Mattis explained his thinking behind the degree of discretion he gave Trump.

"I may not like a commander in chief one fricking bit, but our system puts the commander in chief there, and to further weaken him when we're up against real threats -- I mean, we could be at war on the Korean Peninsula, every time they start launching something," he said.

Mattis did note that his code of silence has an expiration date.

"There is a period in which I owe my silence," he said. "It's not eternal. It's not going to be forever."

Fundamental differences

But like Trump's former secretary of state, Rex Tillerson, who was unceremoniously fired via tweet, Mattis is making it very clear, in the short term, that he disagrees with many of Trump's fundamental views about the world and the US' role in it.

Since taking office, Trump, a frequent NATO skeptic, has been sharply critical of some members of the alliance, and notably broke with members of the G7 over the weekend in pushing for Russia to rejoin the group.

While serving in the Trump administration, Mattis and Tillerson publicly insisted they were on the same page as the President despite reporting by CNN and others suggesting the contrary.

But since leaving their posts, both men have spoken candidly about their frustrations, though they have attempted to avoid directly criticizing the President himself.

Speaking to congressional lawmakers and staff earlier this year, Tillerson said he was guided by "American values" such as democracy and freedom, but could not or would not offer an assessment as to whether the same could be said for Trump, according to a congressional aide and a transcript of the meeting obtained by CNN.

Mattis has also offered thinly veiled criticism of Trump's perception of world affairs.

In an essay adapted from the book that was published in The Wall Street Journal on Wednesday, Mattis rejected Trump's preference for American isolationism, writing that the US is "at increasing risk in the world" when it doesn't embrace its allies.

Although Mattis doesn't mention Trump by name, it's clear he's referring to the commander in chief, making the essay another public rebuke of the President over what Mattis sees as the importance of maintaining US alliances and engagement around the world.

When pressed Thursday on Trump's tweet expressing calm over North Korea firing "off some small weapons" -- a view at odds with his national security adviser, John Bolton, and then-host, Japanese Prime Minister Shinzo Abe -- and belittling former Vice President Joe Biden, Mattis cited his experience as a retired Marine Corps general.

"Any Marine general or any other senior servant of the people of the United States would find that, to use a mild euphemism, counterproductive and beneath the dignity of the presidency," he said.

CNN's Caroline Kelly contributed to this report.
Outbrain