WASHINGTON — President Donald Trump deserves credit for ordering the operation that killed Islamic State leader Abu Bakr al-Baghdadi. It was a high-risk mission that required U.S. forces to fly hundreds of miles into al-Qaida-controlled territory to storm a heavily armed terrorist compound. If things had gone horribly wrong, Trump would have been blamed and borne the consequences. Just ask Jimmy Carter how the Desert One disaster affected his reelection. Trump knew the political risks but gave the order to go anyway.

Would Joe Biden have done the same? Unlikely.

The former vice president advised Barack Obama not to carry out the raid that killed Osama bin Laden. As Mark Bowden, author of “The Finish: The Killing of Osama bin Laden,” explained in 2012, “The only major dissenters were Biden and (then-Defense Secretary Robert) Gates, and before the raid was launched, Gates would change his mind.” During a meeting in the Situation Room, Biden later recalled, Obama turned to him and asked, “Joe, what do you think?” Biden answered, “Mr. President, my suggestion is don’t go.” Worse, his reason had nothing to do with national security. According to Bowden, Biden told the president that “if the effort failed, Obama could say goodbye to a second term.” At the moment America had the man responsible for the 9/11 attacks in her sights, Biden was worried about politics, the absolute last thing a commander in chief should be thinking about in such circumstances. In the end, Bowden writes, “every one of the president’s top advisers except Biden was in favor of immediate action.”

Yet, rather than praise Trump for ordering the killing of Baghdadi, Biden blasted the president, declaring the raid succeeded “despite his ineptitude as commander in chief.” The man who opposed the bin Laden operation criticizes the man who approved the Baghdadi operation? That’s rich. And it was the Obama-Biden administration’s withdrawal from Iraq in 2011 that allowed the Islamic State to rise from the ashes of defeat and build a caliphate the size of Britain. Talk about ineptitude.

Obama’s rejection of Biden’s advice not to go after bin Laden does not absolve Obama of criticism for his broader policy in the fight against terrorism. After the bin Laden operation, many pointed out the irony that Obama’s signature national security accomplishment was made possible by information gained from the CIA interrogation program that he had shut down on his third day in office. As former acting CIA director Mike Morrell has explained, the key piece of intelligence that led the CIA to bin Laden — information on bin Laden’s principal courier, including his nickname Abu Ahmed al-Kuwaiti — came from detainees in CIA custody.

Similarly, Trump’s bold decision to go forward with the Baghdadi operation does not absolve him of criticism for his Syria policy. The fact is, taking out the Islamic State leader would not have been possible without the U.S. boots on the ground that Trump has announced he is withdrawing, or without the help of the Kurdish allies whom Trump is abandoning. It was the Kurds who cultivated the source inside Baghdadi’s inner circle who gave us actionable intelligence about his location. So, the Kurds not only took 11,000 casualties in the fight to drive the Islamic State from its physical caliphate, but they also gave us the critical lead that led us to Baghdadi’s doorstep. It’s fair to ask whether the same operation would have been possible six months from now thanks to Trump’s drawdown and betrayal of the Kurds.

Our Kurdish allies deserve better. And we still need them. According to a Pentagon inspector general’s report, even before Trump’s most recent withdrawal announcement, the Islamic State was “resurging in Syria.” It has between 14,000 and 18,000 members, as well as about 3,000 foreign fighters under arms in Syria and Iraq. The New York Times reports that before Trump’s decision to greenlight Turkey’s invasion, Kurdish forces were conducting as many as a dozen counterterrorism missions a day, but now those have ceased. The Kurds were also guarding about 10,000 captured Islamic State fighters, including about 2,000 foreign fighters. Now, according to the State Department, more than 100 of those detainees have escaped and “we do not know where they are.”

And while the loss of Baghdadi is a major blow, the Islamic State has survived similar blows before. Thanks to Trump, Baghdadi is dead. But the Islamic State is not. We still need to keep a boot on its neck, and that requires boots on the ground — and allies such as the Kurds.

Follow Marc A. Thiessen on Twitter, @marcthiessen.