The dysfunction at the highest levels of the American government right now obscures a dramatic reality: Donald Trump is going to defeat the Islamic State, and Americans need to be fine with that.

Like most of the people reading this, I have been so completely absorbed by the drama at the White House over the past week that its been easy to lose track of what’s taking place on the ground in the Middle East, where U.S. troops, diplomats, and intelligence professionals continue to work by, with, and through local forces to destroy the Islamic State.

When President Obama turned the affairs of state over to President Trump on January 20th, the Islamic State was in full retreat across Iraq and Syria. This was no accident: In the fall of 2015, while I was serving as the head of the Pentagon’s Middle East policy shop, the Obama administration ramped up its campaign against the group—and began to see the effects of that escalation when Iraqi forces retook Ramadi in December of 2015.

Over the course of a very difficult summer of 2015—one in which both Ramadi in Iraq and Palmyra in Syria had fallen under the black flags of the Islamic State—civilian and military planners noticed an opportunity: For the first time since their campaign began in 2014, the U.S. and coalition forces surrounding the Islamic State were in a position to squeeze it from all directions.

When I came back into the Department of Defense in 2015 after a two-year sojourn away, I was struck by how well the Islamic State moved men, weapons, and materiel across the battlefield in Iraq and Syria. This allowed them to apply pressure to the places where the forces in opposition were weakest. It also allowed them to mass their own limited forces in places where they could overmatch their opposition.

If we could figure out a way to apply pressure to the group from multiple directions and cut off its key supply routes, that would create real dilemmas for them.

And so that’s what we did.

Primarily working with Iraqi and Syrian partners, the U.S. military and these local forces cut the main east-west lines of communication between Iraq and Syria. We got more aid to our Lebanese and Jordanian partners to help them defend their borders, and we re-started our initially ill-fated plan to train Syrians to fight the Islamic State, giving them specialized training and equipment. Oh, and we delivered an overwhelming amount of airpower in support of local forces fighting the Islamic State at a time when Iraqi forces trained by U.S. soldiers started re-entering the fight in replacement of previously ineffective units. These newly retrained units performed qualitatively better than the units they replaced, and the results on the ground bore that out.

One by one, cities and towns under the control of the Islamic State started falling. Because we were fighting with local partners, it was messier than if we had done it ourselves. The destruction to Ramadi and Fallujah, in particular, was breathtaking. And it took longer than it would have taken if U.S. forces had been in the lead. But it was also a lot less expensive, and only five U.S. servicemen were killed in the process —compared with almost 5,000 over the course of the earlier war in Iraq.

And the success of the campaign was going to be more sustainable than that of our earlier efforts, we told ourselves, because Iraqis and Syrians were owning the fight—at tremendous human cost, I must add—and thus owning the victory.

This was the war President Trump inherited from President Obama.

The Trump administration also inherited some strategic headaches, though certainly not the “mess” the president claims. We never figured out a way to re-take Raqqa, for example, without arming and equipping the Kurdish militias so toxic to our NATO allies in Turkey.

When we passed along our campaign plans to re-take the Islamic State’s Syrian capital in Raqqa to the Trump administration, they dismissed it as “poor staff work” (which is pretty damn laughable considering the quality of staff work that has gone into this administration’s early executive orders, but I digress).  

If the Trump administration wants to continue the momentum against the Islamic State without committing more U.S. troops, it will likely need to arm the Syrian Kurds to a greater degree than America has done so far. While the only truly cohesive local force operating against the Islamic State in Syria—that is, if one doesn’t count Lebanese Hezbollah as local—the Syrian Kurds do not have the kind of equipment necessary to breach the defenses surrounding Raqqa at an acceptable human cost. Giving them more equipment, though, as several former Obama administration officials have recommended, will cause some serious pain in U.S.-Turkish relations.

But the fall of the Islamic State is going to happen, and it’s going to happen on this president’s watch. Like the American jobs he claims to have created that were announced long before he took office, Trump will take credit for the Islamic State’s defeat. It will be in his 2020 campaign speeches, and it will be a cudgel with which he beats the Democrats each time they (or John McCain) point out his incompetence on issues of national security.

And Americans need to be fine with that, because as much as many of us do not want this president to get the credit for the work of others, defeating the Islamic State is a national good that should be bigger than politics. And Democrats will do well to remember that the Obama administration could not have done what it did in Iraq and Syria without the support of a Republican-led Congress.

Victory has a thousand fathers—the loudest and orangest of which will be the president. But victory still beats defeat.