At an event in Washington, DC, on Friday, former Defense Secretary Jim Mattis explained why he joined the Trump administration.

According to Mattis, his decision to become defense secretary was informed by the sense of duty he gained over 43 years in uniform.

Visit Business Insider's homepage for more stories.

The myth of Jim Mattis the Marine Corps general was still growing in the most motivated corners of the internet in 2016 when rumors started to fly that the retired four-star, who'd been out of the game for three years at that point, might be returning to the Defense Department as a civilian.

Some took his acceptance of a position as a Trump administration Cabinet secretary as a signal he was aligned with the president not only strategically, but politically. But Mattis told an audience in Washington on Friday that his decision to become defense secretary was informed by the sense of duty he cultivated for 43 years in uniform.

"We're all formed by our formative experiences. Where I come from, first of all, you ride for the brand. The brand is the US Constitution," he said at a Politics and Prose event hosted by George Washington University. "If a Republican or Democrat president calls you and says I want you to do something, you don't sit up on the wall of the castle, wringing your hands. You don't pull a Hamlet saying, 'No, should I do it or not?' Just go to work."

It's the same reason, he said in an interview to promote his new memoir "Call Sign Chaos," that he's declined to criticize Trump since resigning in December of last year.

The general wisdom is that senior military leaders should not speak ill of a sitting president. Despite having served under Trump as a civilian, Mattis said, his reputation as a general precedes him, and he's careful with how he uses his influence.

"I may tell you I'm no longer a general, but in many people's minds, I'm a general," he said.

He did toe the line, though, taking a veiled swipe at Trump's attacks on the soundness of America's intelligence agencies.

"Our intelligence community, regardless of anything you've ready in the newspaper, in terms of other people's assessments — one of the best in the world, if not the best," he said.

His clash with Trump, over withdrawal of Troops from Syria and the president's handling of relationships with key US allies, was not his first time at loggerheads with a president, though it was his most public. And while it remains to be seen whether his warning to his former boss come true, Mattis has a track record of sensing catastrophe before it arrived.

In his memoir, Mattis goes all the way back to the first Battle of Fallujah, in 2004. As the commander of 1st Marine Division, it fell to him to avenge the murders of four US contractors in March of that year. He'd wanted to work with local opposition fighters to hunt down the insurgents who had killed them, but it wasn't to be.

"I wanted to do it with raids into their homes at night, that sort of thing," he said. "I didn't want to charge into a city of 350,000 people."

But President George W. Bush and his top advisers settled on an invasion of the city to quell the insurgent threat.

"And then, what you have to do is, I'm going to do this as well as if I'd come up with it myself," he said. "I said, 'Okay, I'm going, but don't stop me.'"

As the legend goes, the rising death toll of American troops overwhelmed the US's resolve to keep up the fight, and it was over in less than three weeks. Six months later, the second Battle of Fallujah finished the job.

Almost a decade later, another disagreement with a different commander-in-chief ended Mattis's career.

"I found the president curious," he said of President Obama. "At times, military leaders have to bring wars — what he referred to as the grim realities — into the discussion, but politicians who are trying to go for peace and prosperity, education ... somehow we have to bring that thinking into the decisions made in war, which is completely alien to what we're trying to do in this beautiful democracy."

A CIA briefer had warned Mattis, then commander of US Central Command, that Obama's plan to pull troops out of Iraq would backfire.

"By the summer of 2014 — this was in 2011— by the summer of 2014 an al-Qaida group stronger than ever, more resourced than ever and more vicious than ever, will come out," the analyst warned him. "I left there in 2013, and 14 months later we had to go back in with troops with millions of people turned into refugees, by the very people — ISIS — that the CIA briefer had briefed on."

"The's the catastrophic results of a strategic decision. While I thought it was strategically unsound ... you just have to deal with it," he added.

But as far as his own rumored aspirations for the Oval Office, Mattis responded with a resounding, "No, no."