U.S. commanders had chafed, however, at the Obama administration’s sensitivity to the number of U.S. “boots on the ground,” and restrictive rules of engagement that required White House approval for many lethal strikes. Mattis thus moved to accelerate the anti-ISIS campaign, deploying more forces, and, with Trump’s approval, pushing the authority to launch lethal strikes down to U.S. field commanders.

To limit the ability of ISIS fighters to retreat and regroup, and for foreign fighters to slip through the coalition dragnet and return to their home countries and launch terrorist attacks, Mattis also developed an “annihilation strategy”: Rather than allowing ISIS fighters to flee from one battle to the next, the strategy calls for coalition forces to first encircle ISIS strongholds such as Mosul and Raqqa before starting operations to recapture them. U.S. military officials credit the strategy for limiting the number of ISIS fighters able to escape and live to terrorize another day. Mattis also did some damage control, asking Kurdish leaders to postpone a scheduled independence referendum.

On his trip, Mattis also suggested that the United States might leave a residual U.S. military force in Iraq for the foreseeable future, living up to the spirit of the Strategic Framework Agreement, a 2008 partnership first signed by President George W. Bush and his Iraqi counterpart. “[We] will continue standing by the Iraqi people and their military…to maintain the stability that has been earned at a very, very high price.”

The fight against ISIS has both unified Iraq and solidified the partnership between Washington and Baghdad, Jon Alterman, the director of the Middle East Program at the Center for Strategic and International Studies, told me from Iraq, where he arrived just after Mattis’s visit. “To the extent that the Iraqis were concerned that the United States would abandon them again, Mattis and Trump’s other generals all send the opposite message. They all have an intimate familiarity with Iraq, they know exactly where it is on a map, and they are looking for ways to leverage the costs and sacrifices the United States has already made here.”

Mattis’s warrior pedigree and reputation also calmed nerves in Jordan, where this week for the first time as defense secretary he met with King Abdullah II, a staunch U.S. ally. Like the other Sunni-Arab regimes in the Middle East, Jordan’s was concerned by the Obama administration’s opening to Iran through the nuclear deal, and the perception that America no longer strongly opposed its destabilizing role in the region. By contrast, then-General Mattis had been eased out by the Obama administration as head of U.S. Central Command because of his harsh rhetoric about Iran.

Where Iran is concerned, Mattis is now unmuzzled. In a rare recent interview with The Islander, the newspaper of Mercer Island High School, he described the Iranian regime as “acting more like a revolutionary cause.” This is a government that attempted to murder the Saudi ambassador to Washington, and employs surrogates like Lebanese Hezbollah that continues to threaten Israel and kill Israeli tourists, he noted. It has also supplied ballistic and anti-ship missiles to Houthi rebels in Yemen who have used them to attack Saudi Arabia and international shipping; at home, it continues to imprison many young Iranians, Mattis said. Iran is also “the only reason” Syrian President Bashar al Assad remains in power, he said. “So Iran is certainly the most destabilizing influence in the Middle East.”