You should greatly lament President Trump's announcement on Thursday that Defense Secretary Jim Mattis is resigning.

A scholar and retired four-star Marine general with the extremely unsuited nickname, "Mad Dog," Mattis is universally respected by U.S. allies and universally feared by U.S. foes. In his resignation letter, Mattis noted that Trump deserves a defense secretary who is in closer alignment with his own views.

While Mattis' letter pointed out the importance of alliances, we must assume the president's premature withdrawal of U.S. forces from Syria played a role. Mattis strongly opposed that choice in recognition of the damage it will do to U.S. interests. To be clear, pulling out of Syria now is an act of supreme strategic idiocy. Alongside rumors that Trump may imminently withdraw forces from Afghanistan, it is obvious that Mattis' advice was being ignored. In that sense it was likely inevitable that the lifelong public servant would step down.

Still, U.S. allies will be particularly alarmed that Mattis' resignation comes so soon after the Syria withdrawal announcement. They have relied on Mattis as a firm counsel at the president's side and a voice that kept the president attuned to the importance of institutions such as NATO. One senior official from a major U.S. ally told me on Thursday that "he would do anything for" Mattis. And the defense secretary's statesmanship was also instrumental in managing difficult partners such as Pakistan.

Then there was Mattis the leader. An incarnation of the Marine Corps hymn, Mattis was all about honor, country, and leadership. He was willing to break careers and make them in the better service of the Corps and the nation. And on the battlefield, Mattis commanded his men and women like Alexander the Great: from the front and always seizing initiative.

Mattis was also a reformer. He realigned the Pentagon toward the restraint of China's aggression and into a more efficient procurement process. It is crucial that Mattis' successor maintain these reforms. Mattis was also a necessary Trump administration outlier on Iran. Removed as Central Command's commanding officer by former President Barack Obama for his perceived hawkishness on Iran, Mattis was the more cautious voice on Iran in the Trump administration. In both scenarios, Mattis was simply a realist.

But perhaps the greatest loss here is that Mattis is by far the most versed Trump administration official when it comes to history and strategy. This gives him the ability to see threats as part of a continuum, rather than as single challenges in each moment. As I noted when Mattis was first appointed to lead the Pentagon, a 2014 paper by Major Michael Valenti recounts how Mattis mitigated problems with supply lines and terrain before the 2003 invasion of Iraq. Mattis “studied National Geographic magazines to gain an appreciation for what would happen if the area between the Tigris and Euphrates Rivers flooded as it did in 1955.” Mattis "mandated that every major and above in the division read Russell Braddon’s The Siege, which tells the story of the British Expeditionary Force’s time in then-Mesopotamia during World War I, because it was one of the few books written about fighting in Iraq."

This matching of warrior spirit to supreme intellect is the crucial ingredient of what makes Mattis and the Marines so great. Now that greatness will lose its place at the heart of American security.

Trump must pick someone in Mattis' vein — not an ideologue who will stroke Trump's ego and feed him his favored delicacy: groupthink.