When former defense secretary Jim Mattis is asked about his relationship with President Trump, he has an answer ready.

"I don't discuss sitting presidents," Mattis tells NPR in an interview. "I believe that you owe a period of quiet."

But Mattis is expansive on what he describes as "misaligned" U.S. strategy in the wars in Afghanistan, Iraq and Syria. The shifting policies and goals of successive administrations have contributed to the long, frustrating wars in the region, says Mattis, who is speaking out with the release of his book, Call Sign Chaos: Learning to Lead.

"Sometimes we've gone in in order to stop terrorist attacks on America and then we've shifted to, 'We're going to bring democracy,' and more or less impose democracy on certain countries that may or may not have all of the underpinnings necessary to be successful," he says.

Mattis spent four decades in the Marines. He served as a commander in Afghanistan shortly after the al-Qaida attacks in 2001. He was the head of Central Command, overseeing the U.S. wars in Afghanistan and Iraq under President Obama. And he served as defense secretary for nearly two years under President Trump before resigning at the end of last year.

Defining goals

"What you have got to do is figure out what it is you intend to do at the outset [of a war] and then hold firm to that and don't half-step it," Mattis says. "I think that we have had serious policy challenges in figuring out exactly what it is we intend to do and then holding firm to that vision."

His criticism was directed broadly at U.S. war fighting over the past two decades. However, he left the Trump administration after the president indicated he wanted to pull U.S. forces out of Syria.

The U.S. troops helped drive the Islamic State out of the territory it once held, but Mattis and other military leaders have indicated they would like to keep at least a small force in Syria — which remains the case so far.

Speaking about the U.S. wars in general, Mattis says:

"You may want a war over. You may declare it over. You may even try to walk away from it. But the bottom line is the enemy gets a vote, as we say in the military, and we simply have got to understand that terrorism is going to be an ambient threat. We're going to have to work with allies against ISIS and we're going to have to keep up the fight. I'd like to have a more positive message. But the fact is that's a reality we're going to face for our time."

Mattis also stressed the need for the U.S. to work closely with allies.

"Throughout history, we see nations with allies thrive, and nations without allies wither," he says.

Support of allies

Mattis notes that when he was sent to Afghanistan in 2001, the Americans were fighting with eight allied nations.

"They were alongside us because they shared the values, the sense that terrorism was a threat to everyone," Mattis says. "So when you go into these kind of situations, you need every ally you can get your hands on. You need all of them. You need their votes in the United Nations. You need their troops on the ground."

Trump has often criticized U.S. allies, and NATO in particular, saying those countries are relying too heavily on the U.S. for their security.

Mattis says that when he was a senior military commander, "I didn't expect to be obeyed, but I expected to be heard. I think we have gotten into a position where our policies and our strategies have been misaligned to the problems, and part of the reason is we don't have a sufficiently strategic approach."

He says his remarks are not a "criticism of any one policy or any one leader," adding, "I bear no rancor."

Copyright 2019 NPR. To see more, visit https://www.npr.org.