Whatever the impetus, Trump’s all-in reaction is worrisome. My experience as a counterterrorism official in the Obama administration drove home the inescapable fact that the world of counterterrorism is rarely suitable for black-or-white, you’re-with-us-or-you’re-against-us treatments of our partners.

That’s because the United States, for all its might, relies heavily on partners for a wide range of counterterrorism support. Take Qatar as a perfect example. The country hosts America’s largest military base in the Middle East, used for critical counterterrorism missions in Afghanistan, Iraq, and Syria. Other reports have indicated that the nation’s assistance was critical in freeing a U.S. hostage held by al-Qaeda’s Syrian affiliate, much as Qatar reportedly later helped free a Canadian hostage held by the Taliban. And the Pentagon itself has boasted of involving senior Qatari military leadership in discussions convened by the chairman of the Joint Chiefs of Staff on how to counter violent extremist organizations.

None of this is intended to suggest that Qatar is a perfect counterterrorism partner. In particular, its persistent willingness to turn a blind eye to terrorist financiers operating within its borders long frustrated those of us who saw cutting off monetary flows as essential to whole-of-government counterterrorism efforts.

But few counterterrorism partners are perfect. To the contrary, many partners tolerate certain extremist groups even as they help the United States address the threats posed by others. If Washington simply wrote off each counterterrorism partner when that partner frustrated us, American leadership would be left with some serious gaps in its ability to address a complex and geographically expansive set of threats. There are ups and there are downs in counterterrorism partnerships, but Washington’s general approach has been to work through them. As Chairman Corker put it in his response to Trump’s statements on Twitter: “Our position generally as a nation has been that these things ebb and flow and they come up from time to time, but we work with all of the countries”—or, to offer a friendly amendment, with those countries that don’t cross moral and legal lines that make partnership unacceptable and counterproductive.

That’s because the alternative is simply unsustainable—to take on, by ourselves, every terrorist threat everywhere. That’s a recipe for overexpansion, military fatigue, economic drain, and frayed relationships across the globe. There’s always a healthy balance in counterterrorism between how much Washington takes on itself and how much it asks of its partners. But to forgo certain partners outright—especially via tweet, without apparent consideration and deliberation—is to lose out on key tools in the counterterrorism toolkit.