Marine Corps Gen. James Mattis listens during his confirmation hearing July 27, 2010 on Capitol Hill in Washington, DC. Alex Wong/Getty Images President-elect Donald Trump's pick for Defense Secretary called the invasion of Iraq a "strategic mistake" at a conference last year, in an audio recording obtained by The Intercept.

In a wide-ranging speech at an ASIS International Conference in Anaheim, California that covered everything from Iran, ISIS, and other national security issues, retired Marine Gen. James Mattis told attendees: "We will probably look back on the invasion of Iraq as a mistake, a strategic mistake."

The assertion is not particularly controversial, given the faulty intelligence that led to the invasion, the many missteps afterward, and the unraveling of a country that eventually gave birth to the terrorist group ISIS.

But it is interesting as it's the first known instance of Mattis portraying the invasion in a negative light, especially given his leadership of 1st Marine Division in 2003, which he led across the border and, eventually, into Baghdad.

"I think people were pretty much aware that the US military didn’t think it was a very wise idea," he said. "But we give a cheery ‘Aye aye, Sir.’ Because when you elect someone commander in chief — we give our advice. We generally give it in private."

Mattis, like many other generals before the war, offered his advice to his boss Defense Secretary Donald Rumsfeld on the problems of going into Iraq. This frank advice is expected of high-ranking military officers, but ultimately it's up to the civilian leadership to make the decision.

Still, seven retired generals eventually came out publicly against Rumsfeld in 2007 in what was dubbed "the generals' revolt." Mattis, still on active duty at the time, was not among them.

He was asked specifically about whether there was a scenario in which he may have retired in protest during a talk in San Francisco in April 2014. Mattis allowed some unethical orders and other scenarios that would lead him to do so, but he said, "you have to be very careful about doing that. The lance corporals can't retire. They're going. That's all there is to it."

He added: "You abandon him only under the most dire circumstances, where the message you have to send can be sent no other way. I never confronted that situation."

Since retiring from the military in 2013, Mattis has given a number of speeches while working as a fellow at Dartmouth and Stanford. In July 2014, for example, he told students at Stanford: "There is no strategy right now for our engagement with the world. We need to know the political end state for what we want to achieve."