Washington — Former Secretary of Defense Jim Mattis is breaking his silence for the first time since leaving office last December. He has a lot to say about his former boss, without calling him out by name.

Mattis quit as defense secretary right after President Trump ignored his advice and ordered U.S. troops out of Syria.

"I did as well as I could for as long as I could," Mattis writes in excerpts from his new book "Call Sign Chaos," published in The Wall Street Journal. "When my concrete solutions and strategic advice, especially keeping faith with our allies, no longer resonated, it was time to resign."

Just a few months before, he had been a favorite of the president.

In his resignation letter, Mattis referred to his strongly held "views on treating allies with respect," an apparent reference to Mr. Trump's complaints about the value of bedrock alliances like NATO. Angered by the blunt letter, the president fired him.

Jim Mattis listens to President Trump deliver remarks March 8, 2018, in Washington, D.C. Getty

"What's he done for me? How has he done in Afghanistan? Not too good. Not too good," Mr. Trump said in January.

The retired four star general does not criticize Mr. Trump directly, saying he will not speak ill of the commander in chief. But there's little doubt when he writes "a polemicist's role is not sufficient for a leader." He is referring to the president's controversial tweets and statements. "What concerns me most," Mattis writes, "is not our external adversaries; It is our internal divisiveness."