Lost in the inaugural hullabaloo was Tuesday’s news that President Obama has relieved Gen. James “Mad Dog” Mattis, the colorful and highly decorated Marine who’s been in charge of the crucial US Central Command, which oversees the various wars in the Middle East, since 2010.

Mattis is famous for his blunt style and blistering aphorisms — “be polite, be professional, but have a plan to kill everybody you meet” was his clear-headed advice to the Marines he led during the treacherous Iraq War. He’ll retire from both CentCom and the Corps in March, several months short of his expected tour of duty.

But why? Could it be that, as Obama prepares to cede Afghanistan back to the Taliban, the last thing he needs is an obstreperous general gumming up the surrender?

For an administration whose relationship with the military is, to put it mildly, fraught with tension, Mattis is yet another wall trophy, to go alongside the heads of Gen. Stanley McChrystal (fired in 2010 as the commander of the US forces in Afghanistan) and David Petraeus, who left CentCom to be buried alive at the CIA (and later resigned over the Paula Broadwell sex scandal).

Officially, the administration offers a nothing-to-see-here explanation for Mattis’ departure, noting that his tenure in the crucial job was about average for the post.

Maybe. But politics is at play here as well. The brusque Mattis apparently fell afoul of National Security Adviser Tom Donilon, an Obama apparatchik. Why? Because Mattis says things the Obama team doesn’t want to hear, especially about what might well become the next theater of operations — Iran.

Thinking two or three moves down the line, the hard-line Mattis was known for peppering his civilian superiors with uncomfortable questions: What happens in Iran when and if the nuclear threat is neutralized? What if we have to fight a conventional war with the mullahs? Then what?

The line between frank outspokenness and open insubordination is a narrow one, and under our system, even top-level officers must cede to civilian authority. President Harry Truman famously fired the Army’s top general, Douglas MacArthur, during the Korean War for trying to go over his head to Congress in his quest for total victory on the Korean peninsula.

But officers must be prepared to tell the politicians what they need to hear, not what they want to hear. Choking off discussion to satisfy policy preferences — as the Bush administration arguably did in the runup to the Iraq War — can only lead to disaster.

Similarly, generals should not be politicians. Even after winning World War II, Gen. Dwight D. Eisenhower agonized about going into politics (for a long time, no one even knew which party he supported), and it’s long been a tradition in certain branches of the armed forces for officers to refrain from voting, lest they become politically invested.

But since the Clinton administration, there’s been a political tug-of-war between the generals and the politicians (think of the fight over gays in the military), which only got worse in the Bush years, when Defense Secretary Donald Rumsfeld openly bullied his commanders in the field, and Gen. Colin Powell traded in his uniform for a politician’s suit.

Things have only gotten worse under Obama. We’ve had a dispiriting merry-go-round when it comes to command in the Afghanistan-Pakistan theater; such instability at the top threatens the hard-won gains of our fighting forces.

And with at least three of our most effective fighting generals now cashiered or forced into retirement, the president is sending a clear message to the rest of the world.

That message is: Sound the retreat.