The emergent winner of the Arab upheavals of 2011 is Sunni Islamism. This is reflected most centrally in the election results in Egypt, where the Muslim Brotherhood and the more extreme Salafi trend have won a landslide victory. Arab Sunni Islamist regimes are set to emerge in the period ahead as factors in the regional contest for power.

The emergence of regimes of this type is bad news for the West, but it also represents a setback for the main enemies of the West in the Mideast — namely, Iran and its allies. The rise of Sunni Islamism has implications in the Palestinian arena.

Hamas is currently seeking to exit the Shia, Iran-led bloc in the direction of Sunni Islamist power. Meanwhile, Iran is focusing on its solid link with the Palestinian Islamic Jihad movement as an alternative to the dying alliance with Hamas.

Over the previous decade, Tehran had hoped to unite Islamist and anti-Western forces in the region behind its banner, and thus to emerge as the main challenger to the U.S. This ambition contained a fairly obvious flaw: the Iranians are Shia Muslims and non-Arabs. They were hoping to lead an area consisting overwhelmingly of Arabic-speaking Sunni Muslims. The rise of Arab Sunni Islamism to prominence and dominance in Egypt, Tunisia, Libya, and perhaps soon Syria casts a spotlight on this contradiction.

This has placed Hamas in a decidedly uncomfortable position from which it is now trying to extricate itself. Hamas is an outgrowth of the Sunni Muslim Brotherhood. Yet over the last decade, it had also become a card-carrying member of the Iran-led regional bloc. The movement’s leadership was domiciled in Syria, the long-term Arab ally of Iran. Iran provided money, weaponry, and training for Hamas’ sovereign Gaza enclave.

But in recent months, Hamas has faced a situation in which its fellow Sunni Muslim brothers in Syria are engaged in an uprising against a non-Sunni regime under whose patronage the Hamas leadership lives. The regime is seeking to suppress this revolt using methods of utmost viciousness and brutality. At the same time, as Sunni Islamism rises to power elsewhere, a number of attractive potential alternative patrons for Hamas seem to be emerging.

So Hamas is now trying to quietly exit the Iranian camp for pastures new. Leadership cadres in Damascus have in recent months moved themselves and their families out of Syria to a variety of regional destinations. Only a small staff remains in the Syrian capital. Hamas in Gaza has staunchly refused to hold demonstrations in support of the beleaguered Assad regime. The furious Iranians have threatened to cut vital funding from the Gaza enclave, to no avail.

Meanwhile, the search has been on for a new home. Among the possible destinations are Qatar, Egypt, and Jordan. The latest reports in Arabic media, however, have pointed to Tunisia as the most likely destination. A Muslim Brotherhood-associated party is already in unambiguous control of the country, unlike in the other countries listed. On the other hand, Tunis is a long way from the area of Hamas’ main interest.

In the latest semi-surreal episode in Hamas’ return to the Sunni Arab mainstream, the movement has been asked to mediate between the Arab League and the Syrian regime. Hamas leader Khaled Meshaal has sent a message to Bashar Assad, “advising” Assad to comply with the Arab League Memorandum of Understanding that he signed on December 19 and has been ignoring ever since.

It is easy to imagine the apoplectic reaction in Tehran to Meshaal’s promotion of himself from junior client to mediator, however there is little the Iranians can do to stop Hamas. Hamas’ Fatah rivals also reacted scornfully, but there is little they can do about it, either. The rise of Sunni Islamism in the Arab world is a net loss for both Iran and Fatah. Hamas sees it, correctly, as a potential net gain for itself and is maneuvering to extract maximum benefit.

The Iranians do not entirely lack cards in the Palestinian arena. Unlike Hamas, Palestinian Islamic Jihad remains firmly committed to its alliance with Tehran and Damascus. Islamic Jihad, which has built up a powerful independent military capacity in Gaza, is an important tool of policy for the Iranians. It can be used, when its masters wish, to disturb the quiet that Hamas currently prefers. This was seen in October 2011 when Islamic Jihad engaged in a unilateral escalation against Israel, firing Grad rockets at Ashkelon and other population centers.

Islamic Jihad notwithstanding, the slow exit of Hamas from the pro-Iranian bloc offers a clue as to the direction of regional politics in the aftermath of the 2011 changes. The move is toward increased sectarianism and the rise of Sunni Arab Islamism. This new gathering of forces is a natural opponent both of the West and of the Iran-led regional bloc which before 2011 was the main enemy of the U.S. and its allies in the Mideast.