U.S. Defense Secretary Jim Mattis says he will be stepping down at the end of February.

We'll give Michele Flournoy, undersecretary of defense for policy under former President Barack Obama from 2009 to 2012, today's award for chutzpah.

Reacting to President Donald Trump's declaration earlier this week that the Islamic State had been defeated and that the United States was withdrawing its troops from Syria, she commented to the BBC that "it's particularly terrible for the men and women who put themselves in harm's way in support of the U.S. strategy to have the rug pulled out from under them with no notice, no explanation, no plan to secure the hard-fought gains they've made."

Flournoy should know. It was under her tenure that her boss made the fateful decision to withdraw all United States troops from Iraq — against the decision of most Republicans and many U.S. military officials — in 2011.

That vacuum left an opening for the rise of the Islamic State, the jihadist military group Obama called the "JV team" that by late 2015 had slaughtered thousands and captured significant amounts of territory in western Iraq and eastern Syria.

Not until recently, with the help of stepped-up U.S. support under Trump, has the group been beaten back and forced to cede most of the territory it had claimed.

We don't disagree with Flournoy's sentiment, though, and we hope she learned something from Obama's bad decision, but she didn't mention that.

No, we believe troops should have remained in the region until U.S. military leaders there felt the job was done, just as they should have remained in Iraq for the same security reasons.

Now it's true that Trump's never been wild about the country's ventures abroad since the terrorist attacks of Sept. 11, 2001. Indeed, he made no bones about it on the 2016 campaign trail, criticizing former President George W. Bush for his decisions to fight in Iraq and Afghanistan and declaring a Trump presidency would have no such foreign entanglements.

But once he assumed the presidency, and had access to better intel, he more clearly understood the missions and didn't attempt to micromanage military strategy.

Until this week, and now it has cost him one of his most valuable assets — Defense Secretary James Mattis.

Mattis, one of the president's few original Cabinet picks both to still be on the job and to have avoided extra scrutiny during the confirmation process from Democrats who hated the president and were still sore from his upset win, turned in his letter of resignation, effective Feb. 28.

In it, he took a thinly veiled shot at Trump's America-first strategy, a strategy which has advantages but also weaknesses.

"One core belief I have always held," Mattis wrote, "is that our strength as a nation is inextricably linked to the strength of our unique and comprehensive system of alliances and partnerships. While the U.S. remains the indispensable nation in the free world, we cannot protect our interests or serve that role effectively without maintaining strong alliances and showing respect to those allies."

In other words, even if you're the president of the United States, you don't up and decide that you're going to withdraw all your troops from a country without discussing it with your advisers, without discussing it with your allies and without the job being done.

Trump, he suggested, needs to find "a secretary of defense whose views are better aligned" with his own.

That is actually the problem. The president, too often we feel, keeps his own counsel. In that way, he is his own chief of staff, secretary of defense, secretary of state, secretary of the interior, trade representative and, perhaps unfortunately, attorney.

It was said at the time that former President Jimmy Carter had a similar problem — not exactly in the same way, but in wanting to have his hands on the minutest details — and that didn't turn out so well for him.

Trump, in fact, wants troops to be withdrawn from both Syria and Afghanistan. He and many Americans are weary of Middle East wars, but drawdowns need to be strategic, not sudden. In fact, his actions reminded us very much of what he criticized Obama for — telling the enemy when he would be withdrawing troops. Obama was wrong to do it, and so is Trump.

The president's next pick for defense secretary may give the country a signal as to what foreign policy in the last two years of his term will resemble. Another steady, experienced hand like Mattis would give us hope the president just had a lapse in judgment on troops this week. A weak leader, a political appointee willing to let the president call all of the shots, would give us pause. That may not be something the country can afford.

We hope he chooses wisely.