The Navy SEAL raid on an Al Qaeda encampment in Yemen on January 29 was the first counterterrorism operation ordered by President Trump. The assault killed more than two dozen civilians (including nine children), missed its primary target, and left a Navy SEAL dead. Candidate Trump threatened to torture “radical Islamic terrorists,” kill their families, and carpet-bomb their bases. The difficulties with the Yemen operation point to the severe challenges that his administration will face in fulfilling the expectations raised during the 2016 campaign.

The Islamic State (ISIS or ISIL), which the Trump administration has pledged to annihilate, is arguably on its last legs in much of the Muslim world. A closer examination of just how it has been pushed back, however, reveals that it takes a global village to defeat ISIS. Unwelcome though the revelation may be to the ideologues in the White House, conservative Muslims are among our best allies against the violent and brutal radicals.

Since December 2015, moderate Libyans have formed a Government of National Accord and confronted ISIS, which early in 2015 took over the Mediterranean city of Sirte and grew to more than 6,000 fighters. Starting last May, Al-Bunyan al-Marsus, or the Firm Foundation, a coalition of militias supporting the GNA, fought a relentless and ultimately successful battle to take Sirte back. Fighter jets from the US Africa Command flew hundreds of bombing missions in support of the FF, in what must surely have been one of the US military’s more underreported battles in modern history. But here’s the kicker: Some of the FF militiamen are conservative Muslims. In particular, the Madkhali Salafis of Sirte, who’d been expelled by ISIS, took up arms and helped the FF liberate their city.

The Madkhalis follow a Saudi cleric who preaches a rigid fundamentalism yet urges his followers to avoid violence or engagement in politics. Any Madkhali who showed up at a US airport these days (assuming that Lib­yans aren’t banned again) would certainly be pulled aside for an intensive interview by immigration authorities, given their distinctive dress. But the Madkhalis—almost a caricature of what White House Rasputin Steve Bannon fears most in Islam—have been among the groups that destroyed a major ISIS base and scattered the terrorist remnants into the desert. They are part of the only effective armed force that the US- and UN-backed GNA has. Washington needs allies like these to defeat ISIS. (Sirte is less than 1,000 miles by road and ferry from Palermo in Europe.)

The victory at Sirte and the recovery by mainstream Libyan government forces of the country’s oil resources was President Obama’s last big foreign-policy triumph—an unheralded one in the media, especially in the right-wing press. It happened only after two years of sustained effort working through the United Nations to establish a Libyan government of national unity (however rickety) and find a pro-Tripoli military force to back with US air power.

As for Iraq, ISIS is on the verge of being entirely rolled back there as a state-like organization that controls territory. The Iraqi military and its allies—the Kurdish peshmerga, Shiite militias, and the US and allied air forces—have taken city after city away from the phony “caliphate.” The Iraqi government now holds east Mosul and is preparing for a final assault on the terrorist organization’s last stronghold in west Mosul.

Iran has offered key support for this effort, training and probably helping fund the Shiite militia auxiliaries of the Iraqi Army. Some of these militias are about as fundamentalist as you can get, albeit of the Shiite variety. But guess what? If you want to defeat a horrific terrorist group like ISIS—one that massacres Shiites—you probably want some Shiite allies. Iran is Shiite, yet several members of the Trump administration have adopted a belligerent posture toward that country, even as more than 5,000 US troops in Iraq depend on Iran’s Shiite allies for their security.

Although the Trump administration hasn’t announced how exactly it plans to liberate the ISIS capital of Raqqa in Syria, one thing is certain: Unless Trump is willing to commit a very large US ground force—larger than anything seen since the Bush administration—then Raqqa will ultimately be liberated by a Muslim fighting force allied with… Trump.

President Trump and his people should regard his predecessor’s successes with a more dispassionate eye. The victory in Sirte resulted from Obama’s politicking, cajoling, and forming alliances with a range of secular and fundamentalist Muslim groups in Libya. It did not issue from torture, kidnapping, insulting and excluding allies, or announcing apocalyptic plans for a war on Islam, which Steve Bannon seems determined to wage.

As for ISIS in Iraq, far from succeeding through the brutal tactics advocated by Trump, the Iraqi Army has managed to take more than half of Mosul without doing significant damage to the buildings and infrastructure. There has been no carpet-bombing, at Baghdad’s request. The civilian population, much of which has remained in the city during the campaign, is visibly grateful to be liberated from ISIS’s mafia-like hold, despite the country’s Sunni/Shiite divide (Mosul is mostly Sunni, the government Shiite-dominated).

The long-term success of the Mosul campaign will depend not only on effective, targeted military action but on a politics of reconciliation. Those Shiites who blame Mosul’s residents for throwing in with ISIS will tear Iraq apart if they now seek reprisals, à la Trump, rather than national unity.

The military officers, politicians, and translators who made these victories over ISIS possible—a significant gain for US 
security—had been excluded from so much as visiting this country by Trump’s Muslim ban. Such a slap in the face doesn’t augur well for future cooperation.

Then again, Trump has more personae than Melissa McCarthy. During the campaign, he postured as the tough guy—tougher than the generals who, he said, had failed under Obama. You have to ask: How are Kobane, Manbij, Ramadi, Fallujah, Mosul, and Sirte—all cities where Washington and its allies have defeated ISIS—failures? But there is also Trump the real-estate magnate, who knows (at least sometimes) how to bring people together and close a deal. And if anyone ever needed a broker who could strike a deal, it is Iraq, Libya, Yemen, Syria, and Afghanistan—countries where effective counterterrorism will depend on political compromises, not just firepower. Trump’s posturing has put him on the wrong foot with crucial Muslim allies. But it is not too late to stop giving aid and comfort to the ISIS enemy by driving a wedge between these friends of America and the United States.