On Sunday morning, the Islamic State of Iraq and Syria (ISIS, or ISIL, if you must) pronounced the reformation of the caliphate—the historical Islamic state that once stretched over much of the modern-day Muslim world—with ISIS emir Abu Bakr al Baghdadi as the man in charge.

It’s arguably the boldest move yet by the group, which renamed itself simply The Islamic State. But if ISIS isn’t careful, this could be the moment when all of its gains in Iraq and Syria are squandered; when would-be allies are alienated; and when the group’s critics within the jihadi community were proven right all along.

In the statement—released in Arabic, English, German, French, and Russian—ISIS claimed that it had fulfilled all the legal requirements for the caliphate and that all existing jihadi groups and indeed all Muslims around the world were religiously obligated to swear loyalty to the new Caliph Ibrahim (using the name provided by ISIS in the course of proving that Baghdadi has the required lineage for the title).

Prior to this pronouncement, my assessment was that there was almost no way ISIS could exit June in worse shape than it entered the month, and that still holds. But July is beginning to look like an open question. ISIS, an al Qaeda breakaway group, had made a bold move to seize territory in Iraq that had resulted in tremendous gains in both equipment and money. Even if it lost all of the territory it gained in June, it would still retain many of those spoils, with new clout, status and physical assets to compete with the other jihadi groups operating in Syria and near the Iraq border.

The declaration of the caliphate is a massive gamble that puts many of these gains at risk, although the potential benefits are also substantial. Here's a quick rundown of the moving parts:

Competition with al Qaeda

As I’ve discussed previously, ISIS has been competing with the original al Qaeda for leadership of the global jihadist movement (a great history of the conflict can be found here by Aaron Zelin).

ISIS’s recent gains in Iraq projected strength and dynamism, while AQ Classic looked weak and indecisive. AQ has maintained a slim but diminishing lead over ISIS among key influencers in the movement, and more recent data suggested that it was hurting AQC in fundraising networks, although it also appeared to be diminishing enthusiasm for the jihad in Syria overall.

The pronouncement of the caliphate is sure to be wildly controversial on religious grounds, but ultimately it could cut either way. The backlash may harden the pro-AQ segment of the global jihadist movement against ISIS, especially with the announcement’s flat-out demand that all other jihadist groups are religiously obligated to pledge loyalty to ISIS. But it will also generate some enthusiasm from foot soldiers and different segments of the global movement that see ISIS as a rising star.

There is a risk of high-level defections from AQ to ISIS, particularly in North Africa, where several groups and segments of groups have already broadly telegraphed their sympathies toward ISIS. A significant number of al Qaeda in the Arabian Peninsula (AQAP) supporters in Yemen have also been showing signs of sympathies to ISIS for some time. Since the announcement, social networks in the neighborhood of AQAP appear to be supportive.

On the other hand, Muslims worldwide are likely, on the whole, to react negatively to the pronouncement. The question here is how many currently nonviolent radicals will jump toward ISIS and how many will jump away from it. Again, this is a high-risk, high-reward scenario for ISIS. It could reap considerable benefits, but the backlash could be severe.

Regardless of how that plays out, today’s pronouncement will likely generate new streams of fundraising and fighter recruitment, even as it depresses others.

The long-term outcome is unclear, but much may depend on what happens next in Iraq.

On the Ground in Iraq

ISIS made its gains in Iraq as part of a coalition of Sunnis with grievances against the Maliki government. Those groups may have seen a temporary advantage in aligning with ISIS, but the pronouncement of the caliphate sends a clear message to all of ISIS’s Iraqi partners that they are the subordinate parties in this alliance. ISIS may have cleared this move with its key allies in advance, but if it didn’t, the power grab could splinter the very coalition that allowed it to seize territory in the first place.

More significantly, the calculus of holding territory has now changed. Prior to the pronouncement, ISIS could have fallen back to its previous domain along the border of Iraq and Syria with little loss of face and a huge increase in its war-fighting capabilities, thanks to captured weaponry and millions of dollars in stolen funds.

Now, if ISIS is driven back, Baghdadi risks being seen as the man who grasped for the caliphate, held it in his hands for one brief shining moment, then lost it all.

Such a loss would highlight the hubris of ISIS in making this pronouncement and would also seem to validate the arguments of al Qaeda emir Ayman al Zawahiri that ISIS’s methodology was flawed and that the splinter group was putting the cart of an Islamic state ahead of the horse of fighting jihad.

The question now is how confident ISIS is about its ability to hold substantial territory in Iraq (reports suggest it is under heavy pressure in Tikrit already, and the United States has yet to deploy any airpower against the insurgents). If ISIS made sure its partners are the ground would support the pronouncement and if it withheld the pronouncement until it was sure it had consolidated its gains, then it is in a position to reap benefits.

If ISIS rushed its timeline or overruled objections from local partners, it may lose its territorial gains quickly and end up condemned for an arrogant and ill-advised power grab. The wording of its pronouncement certainly reeks of arrogance, demanding an oath of loyalty from essentially all Muslims, with dissenters being labeled sinners at best, or apostates at worst.

At best, and in the absence of any surprising new information (which could certainly be coming), ISIS appears to be standing on the edge of a precipice with an adolescent faith in its ability to keep its balance.

It may be able to walk that line, but it’s a stunning and unnecessary risk by a group that could have navigated the next few months with excellent odds of an outcome that ranged from good to very good. Now it has introduced a much higher risk of an outcome that is truly bad for its long-term prospects.

One Potential Path Through

There is one factor that could cause all of this to work out dramatically in ISIS’s favor, but it would require a large number of variables to fall into place. That factor is U.S. intervention.

The prospect of a U.S. military intervention, most likely in the form of air strikes, was already problematic. While there are many who understandably favor hitting ISIS in order to deny it control of territory in Iraq, such a strike would bestow on ISIS the one thing it has until now been unable to definitively claim—legitimacy. A potential new line of jihadist argument then emerges: The caliphate was restored, but it was directly destroyed by the United States.

(Iran could also possibly fill the villain role here, resulting in a different possible tectonic shift in the global movement. And I suppose the Israelis could also intervene, which would probably overturn the entire playing board and start a new, very unappealing game.)

Even before today’s pronouncement, there was a substantial risk that U.S. strikes on ISIS would bolster its standing in the global jihadist community, allowing it to gain ground against al Qaeda in the battle for hearts and minds.

U.S. strikes could also subvert the trend in recent years toward the localization of jihadist conflicts or unite the currently splintered jihadist movement against the U.S. as its primary enemy once more, with ISIS subsequently holding a central position in a unified global struggle.

If the pronouncement of the caliphate is received as legitimate by some significant number of jihadists and their stay-at-home supporters worldwide and...

If the United States is seen to be the most important contributor to destroying that nascent caliphate...

...there could be cascading consequences on a scale we have not previously seen. It could result in waves of terrorist attacks in the West, a surge in foreign fighter recruitment and fundraising, and significant instability in the Middle Eastern states that aren’t already experiencing it.

But those are two extremely large ifs.

If this has been ISIS’s plan all along, it is audacious but borders on the insane. It is an all-or-nothing gambit. ISIS has meaningfully put its existence on the line with today’s pronouncement. It is playing the lottery, and while the odds are stacked against it, sometimes people win the lottery.

Above all else, it is clear that ISIS is an adrenaline addict. If the group survives, it may be emboldened to take even greater risks, and our strategy needs to be informed by that understanding.

The article originally appeared at Intelwire, which delivers breaking news, primary source research, and critical analysis on terrorism, homegrown extremism, and national security.