About a week ago, four Arab countries — Saudi Arabia, Egypt, Bahrain, and the United Arab Emirates — declared an economic embargo on a fifth, Qatar, saying that Qatar’s support for terrorist groups was too great for them to tolerate.

Anyone who isn’t confused by the response to the embargo by American policymakers just hasn’t paid attention.

Defense Secretary James Mattis said that the embargo didn’t pose a problem for our campaign against ISIS. Then President Trump offered to mediate the dispute.

Later, Secretary of State Rex Tillerson then urged an end to the embargo because it was posing “humanitarian problems” and was “hindering U.S. military actions in the region and the campaign against Isis.” About an hour after that, the president condemned Qatar, saying it was supporting terrorism at “a very high level.” Mr. Trump added that on his visit to Riyadh, the Saudis had consulted with him on the problem with Qatar and that during his visit, “I decided, along with secretary of state Rex Tillerson… the time had come to call on Qatar to end its funding… and its extremist ideology in terms of funding.”

Weeks later, Tillerson — who apparently didn’t get the message — engaged his Turkish counterpart in trying to mediate the dispute.

Qatar is a small, gas-rich nation that is quite an oddity. According to the CIA World Factbook, only about 12% of the population is Qatari: about 88% is foreign-born. It hosts a key U.S. airbase at Al-Udeid, which is highly important to our anti-ISIS campaign.

But Qatar is a primary source of terrorist funding. According to various reports, it funds al-Qaeda, Hizballah, Hamas, and a host of other terrorist networks including the Muslim Brotherhood, and though it is supposedly a Sunni nation, it has aligned itself with Shiite Iran.

Qatar’s government funds and runs the Al-Jazeera network, whose television broadcasts (in Arabic) and website (in many languages including English) can properly be characterized as “all jihad, all the time.” Al-Jazeera is probably the most viewed television network in the Arab world.

Stop here for a moment. This is a pot vs. kettle debate. Qatar and Saudi Arabia both fund terrorism. While the Saudis say they don’t fund terrorism globally through their government, their royal family — which is the government in all but name — does so. (A classified State Department 2009 cable released by WikiLeaks detailed how the Saudi royal family was a primary financial supporter of al-Qaeda. The Saudi government funds Wahhabist religious schools around the world, at a cost that probably is in the tens of billions of dollars, to teach their own brand of jihadism.) Qatar’s government apparently funds terrorism directly, and its royals probably just as the Saudis do.

Because of Qatar’s alignment with Iran, the four-nation embargo of Qatar is just another element in the Sunni-Shiite war that dates back to the 8th century. One of the embargoing nations, Bahrain, occasionally suffers armed rebellion by its Shiite minority. Six years ago, the last time that rebellion became serious, Saudi troops rolled into Bahrain to put down the rebellion.

ISIS, though an emanation of Sunni Islam, is also an enemy of the Sunni Arab regimes such as Saudi Arabia and the other embargoing nations. It labels them — as does al-Qaeda — too helpful to the West and thus unfaithful to Islam.

The recent ISIS attack in Tehran made ISIS an enemy of the ayatollahs’ kakistocracy as well. That should make the Shiites and the Sunnis allies in the fight against ISIS, but it won’t because of their ancient feud. That leaves us in the middle with the secretary of state trying to engage with Turkey to resolve the embargo.

Our interest in Turkey, a wayward NATO ally, is partly the same as our interest in Qatar. The Qataris host al-Udeid airbase while the Turks host Incirlik, another huge airbase that also plays a key role in our fight against ISIS. Tillerson is trying to preserve both despite the host nations’ other allegiances. (Turkey is partnered with Russia, and thus with Iran, in supporting the Assad regime in Syria.)

Tillerson’s view is very short-sighted. His attempt to engage Turkey in resolving the embargo of Qatar may, in the short run, help preserve our airbases in both nations. But the president has the better part of the argument. Having the Saudis, Bahrainis, Egyptians, and Emiratis squeeze the terrorist funding out of Qatar might, if the embargo is continued long enough, force the Qataris out of the Iranian orbit. If it cost us our airbase there, it would be very expensive to build another, but it could — and should — be done.

It would be foolish for us to believe that the Saudis, or the other embargoing nations, will cause them — as the president evidently does — to join us in a fight against the Islamist ideology. They can’t, and won’t, because that ideology is part of the foundations of those nations. It has always been in our interest to engage in a war of ideas against that ideology, which pervades both Sunni and Shia Islam. We have never done that, but there is evidence that it may be further splitting the Islamists.

As I’ve written often, the January 2015 speech by Egyptian President al-Sisi was a milestone in the reform of Islam. Al-Sisi condemned the radical Islamists, saying that it was insane for Muslims to make holy those scriptures that put Islam at war with the rest of the world. Though al-Sisi’s speech may not have caused it directly, a recent action by some 130 Muslim clerics in Britain is another part of the Muslim internal ideological war against Islamic terrorism.

After three Islamic jihadists killed eight people in London, running down some and stabbing dozens of others, the three were shot down by British forces. One hundred thirty imams in Britain issued a statement on social media that they refused to hold a religious service for the three attackers.

Their statement said they would not hold Muslim funeral services for the attackers despite the fact that every Muslim, regardless of his actions, is entitled by his religion to such a service. They said, in part, “Consequently, and in light of other such ethical principles which are quintessential to Islam, we will not perform the traditional Islamic funeral prayer over the perpetrators and we also urge fellow imams and religious authorities to withdraw such a privilege.” That is not nearly a rejection as strong as al-Sisi’s, but it is another milestone in the intramural Muslim ideological war.

The intramural ideological war is not the same as the one we should be waging. Nor is it the same as the embargoing of Qatar. But it is an action that the president should praise, forthwith, to encourage the rejection of Islamic terrorism.

The president should direct Tillerson to disengage from Turkey and let the Qatar embargo resolve itself among the nations concerned. If the embargoing nations can force Qatar out of Iran’s orbit, even if they cannot stop the Qataris’ support for terrorist networks entirely, they will have increased their own stability and, at least indirectly, assisted us in slowing Iran’s domination of the Middle East.