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)
Mark Wilson/Getty Images
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)
Now playing
01:49
Mattis writes on experience working for Trump in essay
Sen. Lisa Murkowski (R-AK) speaks to reporters as she arrives for the continuation of the Senate impeachment trial of President Donald Trump at the U.S. Capitol on January 29, 2020 in Washington, DC. The next phase of the trial, in which senators will be allowed to ask written questions, will extend into tomorrow. (Photo by Mario Tama/Getty Images)
Mario Tama/Getty Images
Sen. Lisa Murkowski (R-AK) speaks to reporters as she arrives for the continuation of the Senate impeachment trial of President Donald Trump at the U.S. Capitol on January 29, 2020 in Washington, DC. The next phase of the trial, in which senators will be allowed to ask written questions, will extend into tomorrow. (Photo by Mario Tama/Getty Images)
Now playing
04:08
Murkowski explains why she's voting for Biden nominee
President Joe Biden, accompanied by Vice President Kamala Harris, speaks Tuesday, April 20, 2021, at the White House in Washington, after former Minneapolis police Officer Derek Chauvin was convicted of murder and manslaughter in the death of George Floyd. (AP Photo/Evan Vucci)
Evan Vucci/AP
President Joe Biden, accompanied by Vice President Kamala Harris, speaks Tuesday, April 20, 2021, at the White House in Washington, after former Minneapolis police Officer Derek Chauvin was convicted of murder and manslaughter in the death of George Floyd. (AP Photo/Evan Vucci)
Now playing
03:01
'A step forward': Biden speaks after Chauvin's guilty verdict
CNN's Eli Honig explains how much time former police officer Derek Chauvin, 45, could face after he was convicted of second-degree unintentional murder, third-degree murder and second-degree manslaughter in the case of George Floyd.
CNN
CNN's Eli Honig explains how much time former police officer Derek Chauvin, 45, could face after he was convicted of second-degree unintentional murder, third-degree murder and second-degree manslaughter in the case of George Floyd.
Now playing
03:25
Here's the sentence Derek Chauvin could face after guilty verdict
CNN's Van Jones reacts to Attorney General Merrick Garland's announcement that the Justice Department has launched a federal civil probe into policing practices in Minneapolis following the death of George Floyd and the murder convictions for ex-cop Derek Chauvin.
CNN
CNN's Van Jones reacts to Attorney General Merrick Garland's announcement that the Justice Department has launched a federal civil probe into policing practices in Minneapolis following the death of George Floyd and the murder convictions for ex-cop Derek Chauvin.
Now playing
03:08
Van Jones reacts to Justice Department's Minneapolis police probe
CNN
Now playing
03:14
'Performative outrage': Avlon on GOP backlash to Rep. Waters
Two Honduran children found clinging to an island surrounded by a powerful current in the Rio Grande were rescued by Border Patrol agents and taken into custody, the region's top border official said, the latest example of the dangers migrants face as a growing number desperately attempt to reach the US.
U.S. Border Patrol
Two Honduran children found clinging to an island surrounded by a powerful current in the Rio Grande were rescued by Border Patrol agents and taken into custody, the region's top border official said, the latest example of the dangers migrants face as a growing number desperately attempt to reach the US.
Now playing
02:22
See Border Patrol rescue 2 migrant children in Rio Grande
Biden speaks from the Treaty Room in the White House on April 14, 2021 in Washington, DC.
Andrew Harnik/Pool/Getty Images
Biden speaks from the Treaty Room in the White House on April 14, 2021 in Washington, DC.
Now playing
02:59
Enten: Biden is focused on what Americans care about
CNN
Now playing
02:40
Biden says he's praying for 'right verdict' in Chauvin trial
ST. PAUL, MN - NOVEMBER 6:  Former U.S. Vice President Walter Mondale concedes the election to his Republican opponent Norm Coleman November 6, 2002 in St. Paul, Minnesota. Mondale and Coleman were in a race for U.S. Senate that was too close to call the evening before.  (Photo by Mark Erickson/Getty Images)
Mark Erickson/Getty Images
ST. PAUL, MN - NOVEMBER 6: Former U.S. Vice President Walter Mondale concedes the election to his Republican opponent Norm Coleman November 6, 2002 in St. Paul, Minnesota. Mondale and Coleman were in a race for U.S. Senate that was too close to call the evening before. (Photo by Mark Erickson/Getty Images)
Now playing
03:00
Walter Mondale dies at 93
george w bush congress immigration rhetoric cbs intv sot mxp vpx_00000000.png
george w bush congress immigration rhetoric cbs intv sot mxp vpx_00000000.png
Now playing
01:25
Bush calls on Congress to tone down 'harsh rhetoric' on immigration
WASHINGTON, DC - MARCH 23: Sen. Ted Cruz (R-TX) speaks at a Senate Judiciary Committee hearing on "Constitutional and Common Sense Steps to Reduce Gun Violence" on March 23, 2021 in Washington, DC.  Many senators spoke both for and against gun control the day after a shooting in Boulder, Colorado where a gunman opened fire at a grocery store, killing ten people. (Photo by Tasos Katopodis/Getty Images)
Tasos Katopodis/Getty Images
WASHINGTON, DC - MARCH 23: Sen. Ted Cruz (R-TX) speaks at a Senate Judiciary Committee hearing on "Constitutional and Common Sense Steps to Reduce Gun Violence" on March 23, 2021 in Washington, DC. Many senators spoke both for and against gun control the day after a shooting in Boulder, Colorado where a gunman opened fire at a grocery store, killing ten people. (Photo by Tasos Katopodis/Getty Images)
Now playing
03:18
Berman on Cruz's latest tweet: 'The pot calling the kettle violent'
Now playing
01:57
Chuck Hagel criticizes Trump's statement on Afghanistan
gun laws shootings Comer pamela brown nr vpx _00015627.png
CNN
gun laws shootings Comer pamela brown nr vpx _00015627.png
Now playing
02:23
'I can't answer that': Kentucky lawmaker responds to CNN on gun policy
Now playing
02:39
National security adviser: Russia will face consequences if Navalny dies in prison
Rep. Marjorie Taylor Greene (R-GA) speaks during a press conference outside the U.S. Capitol on February 5, 2021 in Washington, DC. The House voted 230 to 199 on Friday evening to remove Rep. Marjorie Taylor Greene (R-GA) from committee assignments over her remarks about QAnon and other conspiracy theories.
Drew Angerer/Getty Images
Rep. Marjorie Taylor Greene (R-GA) speaks during a press conference outside the U.S. Capitol on February 5, 2021 in Washington, DC. The House voted 230 to 199 on Friday evening to remove Rep. Marjorie Taylor Greene (R-GA) from committee assignments over her remarks about QAnon and other conspiracy theories.
Now playing
03:20
Marjorie Taylor Greene lashes out at media after backlash over controversial caucus
(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.