Former defense secretary Jim Mattis has broken months of silence with an indirect critique of President Trump’s leadership in a new book and interview. But Mattis’s effort to distance himself from the White House has sparked new criticism of his tenure at the Pentagon and the way he has straddled his political and military identities.

Even in retirement, Mattis has sought to play the role of the responsible, apolitical, respected Marine. In an essay published Wednesday in the Wall Street Journal, Mattis obliquely attacked Trump’s dismissive treatment of U.S. allies, without mentioning the president by name.

“Alone, America cannot protect our people and our economy,” Mattis wrote. “A leader must display strategic acumen that incorporates respect for those nations that have stood with us when trouble loomed.”

In an interview published Thursday in the Atlantic, granted in part to promote his book, “Call Sign Chaos: Learning to Lead,” Mattis defended his decision not to directly air his grievances with the president.

“You don’t endanger the country by attacking the elected commander in chief,” he said. “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.”

Mattis’s approach — in which he vaguely describes his frustrations with Trump and then says he can’t criticize him — has brought a hail of disapproval from critics.

“I think he has one of two paths: He can either remain silent . . . or he can go out with very active discussion about the direction we should go and the problems with the president of the United States,” said Loren DeJonge Schulman, who was as a Defense Department official in the Obama administration. “I don’t think there is a middle road.”

Schulman, who is now a fellow at the bipartisan Center for a New American Security, described Mattis’s approach as “incredibly naive” and a reflection of a “lack of political astuteness” that she said was apparent during his tenure as Pentagon chief.

Others argued that Mattis’s silence amounts to a tacit endorsement of the president and his policies.

“Mattis saw his duty as preventing the worst from happening” when he was defense secretary, said retired Army Lt. Col. Jason Dempsey, who has written extensively about civil-military relations. “But he also legitimized the worst. He lent his honor and integrity to the Trump administration. He didn’t just give the president Jim Mattis’s credibility. He gave Donald Trump the military’s credibility.”

Mattis, who declined to comment, was the first former general to serve as secretary of defense since Gen. George Marshall was named secretary in 1950 and required a waiver from Congress to serve. He said that even after he was first approached by Vice President Pence about taking the role in November 2016, he did not think it would come to pass.

“I doubted I was a viable candidate,” he wrote in the Journal essay.

Mattis’s background as a retired military officer moving into a political role complicated his tenure in the Pentagon and has raised the stakes for him in retirement.

“I think Mattis is correct to be sensitive to the way his views would be linked to his status as a retired general officer, and not merely as a retired Cabinet official,” said Peter Feaver, who served in the administration of George W. Bush and now teaches political science at Duke University. “Is his first name General Mattis, or is his first name Secretary Mattis? Look at the way people refer to him, especially on cable TV. His military identity remains quite strong, even though he was in a political position.”

Complicating Mattis’s situation is the extraordinarily divisive, and at times toxic, political environment in the run-up to the 2020 election, made worse in many instances by Trump’s combative leadership style.

“I don’t view it as unethical to write a book on general leadership principles, but he is setting himself up for a painful series of interviews . . . and a painful series of articles,” Feaver said of Mattis.

Even among retired generals, Mattis occupies a special perch as a respected battlefield commander in Iraq and Afghanistan. In Washington, he is frequently praised for his intellect.

“I think Mattis in some ways is either made into a saint or the devil, and he is neither,” said Kathleen Hicks, the senior vice president for the International Security Program at the Center for Strategic and International Studies. “He’s a human. He’s very capable, loyal and patriotic, and for all those reasons in some ways, people put upon him these burdens that aren’t realistic.”

“It’s very hard for any of us to put ourselves in those shoes,” she added.

Hicks noted that Marine Gen. Joseph F. Dunford Jr., the chairman of the Joint Chiefs of Staff and a longtime friend of Mattis’s, also has said that he will not criticize the president, but that there is a fundamental difference between the two leaders at this point. Dunford is an active-duty Marine, and Mattis was serving as a politically appointed member of the Trump administration.

“I think at heart he is that 40-year veteran Marine, and yet he took a political position,” Hicks said of Mattis. “I don’t think he ever became comfortable with the reality that it is, in fact, a political position.”

In his interview with the Atlantic, Mattis repeatedly underscored what he said is his “duty” not to criticize Trump, but he also makes it clear he disapproved of some of the president’s behavior.

At one point, the article’s author reads to Mattis a tweet in which Trump says he is not disturbed by North Korea’s launching “some small weapons” and then attacks former vice president Joe Biden as a “low IQ individual.”

Mattis responded that “any Marine general or any other senior servant of the people of the United States” would find it “counterproductive and beneath the dignity of the presidency.”

“Let me put it this way,” Mattis added. “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?” 

Mattis’s tortured response in interviews mirrors the struggles he faced as defense secretary, said Mara Karlin, the executive director of the Merrill Center for Strategic Studies at Johns Hopkins University.

As a senior administration official, Mattis avoided politics and “sought to focus on the merits and substance of issues the way a wonk or military officer would,” she said. Often, that meant ignoring the wishes of the president or the political feasibility of his proposals, Karlin said. In some cases, Mattis’s approach put the military in a tougher position.

She cited Mattis’s support for the deployment of U.S. troops to the southern border to stop what Trump described as a migrant invasion.

“The military is taking actions that are inherently political,” she said, “but its leadership is trying to turn a blind eye to that politicization.”