U.S. Secretary of Defense Jim Mattis walks to greet incoming National Security Advisor John Bolton upon Bolton
U.S. Secretary of Defense Jim Mattis walks to greet incoming National Security Advisor John Bolton upon Bolton's arrival for a meeting at the Pentagon, on March 29, 2018 in Arlington, Virginia. (Mark Wilson/Getty Images)
PHOTO: Mark Wilson/Getty Images
Now playing
01:49
Mattis writes on experience working for Trump in essay
Now playing
03:19
Some GOP lawmakers are defying Capitol security measures
PHOTO: CNN
Now playing
01:17
Sen. Romney: Senate trial after Trump leaving office is constitutional
PHOTO: CNN
Now playing
03:25
Biden's HHS secretary pick: If we do this, we will get the pandemic under control
Now playing
07:26
'What research did you do?': Brown presses GOP lawmaker on election fraud claims
PHOTO: CNN
Now playing
01:42
Acosta describes covering last day of Trump administration
WASHINGTON, DC - FEBRUARY 06: Rep. Alexandria Ocasio-Cortez (D-NY) attends a press conference with Rep. Andy Levin (D-MI) about their new bill called the EV Freedom Act on Capitol Hill on February 6, 2020 in Washington, DC. The EV Freedom Act is a plan to create a nation wide charging infrastructure for electric vehicles. (Photo by Samuel Corum/Getty Images)
WASHINGTON, DC - FEBRUARY 06: Rep. Alexandria Ocasio-Cortez (D-NY) attends a press conference with Rep. Andy Levin (D-MI) about their new bill called the EV Freedom Act on Capitol Hill on February 6, 2020 in Washington, DC. The EV Freedom Act is a plan to create a nation wide charging infrastructure for electric vehicles. (Photo by Samuel Corum/Getty Images)
PHOTO: Samuel Corum/Getty Images
Now playing
03:35
Rioter charged with threatening to 'assassinate' Ocasio-Cortez, officer
Now playing
02:41
Loyal Texas Trump voters want Biden to be less divisive
Now playing
01:16
Sen. Patrick Leahy doubles as a Batman actor
Now playing
01:33
Chuck Schumer announces timeline for Trump impeachment
WASHINGTON, DC - JANUARY 22: U.S. President Joe Biden signs an executive order as Vice President Kamala Harris looks on during an event on economic crisis in the State Dining Room of the White House January 22, 2021 in Washington, DC. President Biden spoke on his administration
WASHINGTON, DC - JANUARY 22: U.S. President Joe Biden signs an executive order as Vice President Kamala Harris looks on during an event on economic crisis in the State Dining Room of the White House January 22, 2021 in Washington, DC. President Biden spoke on his administration's response to the economic crisis that caused by the COVID-19 pandemic and signed two executive orders. (Photo by Alex Wong/Getty Images)
PHOTO: Alex Wong/Getty Images North America/Getty Images
Now playing
02:31
Biden zeroes in on the teetering economy in first week
White House senior adviser Kevin Hassett speaks with reporters at the White House, Friday, June 19, 2020, in Washington. (AP Photo/Alex Brandon)
White House senior adviser Kevin Hassett speaks with reporters at the White House, Friday, June 19, 2020, in Washington. (AP Photo/Alex Brandon)
PHOTO: Alex Brandon/AP
Now playing
05:08
Ex-Trump official who supports Biden stimulus plan speaks out
Dick Durbin 0122
Dick Durbin 0122
PHOTO: CNN
Now playing
01:41
Sen. Durbin: We can't pass anything without bipartisanship
JOINT BASE ANDREWS, MARYLAND - JANUARY 20: President Donald Trump boards Air Force One at Joint Base Andrews before boarding Air Force One for his last time as President on January 20, 2021 in Joint Base Andrews, Maryland. Trump, the first president in more than 150 years to refuse to attend his successor
JOINT BASE ANDREWS, MARYLAND - JANUARY 20: President Donald Trump boards Air Force One at Joint Base Andrews before boarding Air Force One for his last time as President on January 20, 2021 in Joint Base Andrews, Maryland. Trump, the first president in more than 150 years to refuse to attend his successor's inauguration, is expected to spend the final minutes of his presidency at his Mar-a-Lago estate in Florida. (Photo by Pete Marovich - Pool/Getty Images)
PHOTO: Pete Marovich/Pool/Getty Images
Now playing
04:20
Former top administration officials lobby to convict Trump
Guard Soldiers were ordered to move from the cafeteria to the parking garage
Guard Soldiers were ordered to move from the cafeteria to the parking garage
PHOTO: Obtained by CNN
Now playing
01:42
Photos show National Guard confined to parking garage
mccarthy
mccarthy
Now playing
04:18
McCarthy contradicts himself on Trump's role in insurrection
(CNN) —  

Former Secretary of Defense James Mattis in an interview released Thursday defended his resignation from the Trump administration last year as well as his decision not to outwardly criticize the sitting president, even in his new book.

“I had no choice but to leave,” he told The Atlantic in the interview. “That’s why (my resignation) letter is in the book. I want people to understand why I couldn’t stay.”

Mattis resigned as President Donald Trump’s first defense secretary in late December after the President announced plans to withdraw US troops from Syria, citing irreconcilable policy differences in a letter to Trump that took many in Washington by surprise. His latest interview follows a string of public statements Mattis has made implicitly criticizing his former commander in chief, with whom he sharply disagreed on matters of international engagement and alliances.

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

In this most recent interview, Mattis declined to directly address the character of Trump – with whom he had an openly rocky relationship marked by presidential Twitter insults – citing a “duty of silence” he owed the administration.

“If you leave an administration, you owe some silence,” Mattis 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.”

The retired four star general 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,” Mattis said.

When pressed 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.

He went on, “Let me put it this way. I’ve written an entire book built on the principles of respecting your troops, respecting each other, respecting your allies. Isn’t it pretty obvious how I would feel about something like that?”

But the tight-lipped general did point to an expiration date on his code of silence.

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

Mattis has recently addressed policy matters as they relate to Trump, namely in his forthcoming book, “Call Sign Chaos: Learning to Lead.” 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.

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 in a new essay 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. Mattis’ views were shared after he left the administration.

“A polemicist’s role is not sufficient for a leader. A leader must display strategic acumen that incorporates respect for those nations that have stood with us when trouble loomed. Returning to a strategic stance that includes the interests of as many nations as we can make common cause with, we can better deal with this imperfect world we occupy together. Absent this, we will occupy an increasingly lonely position, one that puts us at increasing risk in the world,” Mattis wrote.

CNN’s Devan Cole, Jeremy Diamond, Barbara Starr and Zachary Cohen contributed to this report.