The Syrian uprising in 2011 embarrassed many of Syrian President Bashar al-Assad’s allies, including Hamas. The Islamist organization was then based in Damascus, and for it to continue watching silently while mainly Sunni demonstrators were being slaughtered would have represented the ultimate hypocrisy. How could Hamas ask Muslims to stand in solidarity with the Palestinian victims of injustice, while failing to condemn acts of brutality against Syrian civilians?

Yet such a shift in Hamas’ attitude took time. Because of international isolation, the organization’s relations then were restricted to Iran and its only Arab ally, Syria. Despite international pressure, Damascus had continued to provide a sanctuary for Hamas outside the Palestinian territories. However, in 2012, the situation changed as Egypt’s Muslim Brotherhood, Hamas’ parent organization, won a majority in the country’s first parliamentary elections. The election of Mohammed Morsi, the Muslim Brotherhood candidate, as Egypt’s president that year helped Hamas finalize its split with the Assad regime. However, the organization wagered on a wave of change in the region, but ended up with nothing.

Between the Egyptian parliamentary and presidential elections, Hamas had already indicated in which direction it was leaning. In April 2012, the organization for the first time took a position on the Syrian uprising at the Azhar Mosque in Cairo, the foremost Sunni theological institution. At a gathering there, Ismail Haniyeh, the prime minister of the Hamas-led government in Gaza, expressed his solidarity with “the great Syrian people.”

Hamas’ involvement in events in Syria appeared to increase after that. From 2012 onwards, reports emerged of Hamas’ role in training anti-regime fighters in Syria, specifically in building tunnels and manufacturing rockets. The Syrian regime accused Hamas of having links with Aknaf Bayt al-Maqdis, a Palestinian rebel group based in the Yarmouk refugee camp. Tensions reached a high point after the arrest of Mamoun al-Jaloudi, a bodyguard of Khaled Meshaal, then the head of Hamas’ Political Bureau. Jaloudi’s confessions about Hamas’ participation in the Syrian uprising were aired on Syrian television, prompting a denial from the organization.

Although Aknaf Bayt al-Maqdis was later dissolved, Hamas paid a heavy price for its strategic error of judgment. That’s largely because in 2013 Morsi was overthrown by a military coup in Egypt, leaving Hamas without a patron in Cairo or Damascus. The new Egyptian regime clamped down on Hamas, destroying the tunnels between Egypt and Gaza that had provided a vital economic lifeline to the Palestinian territory. Though Hamas subsequently reconciled with Iran and Hezbollah, tensions remain. The Syrian regime, in turn, has been unwilling to be more conciliatory with Hamas, remains resistant to resuming ties, and continues to refuse to release the organization’s operatives jailed in Syria.

This relative isolation was exacerbated after Qatar expelled Saleh al-Arouri, the new deputy head of Hamas’ Political Bureau and an operational leader, in June 2017. He found no permanent refuge, and has since had to travel between Malaysia, Turkey, Iran, and Lebanon. While Israeli media have reported on Hamas’ warming ties with Hezbollah and Iran, Hamas officials remain convinced that a return to the pre-2012 alliance is far-fetched.

The lack of a foreign base and the loss of longtime allies drove Hamas to adopt a different approach to fighting Israel, one that would enhance the organization’s capabilities, and credibility, when these were diminished. It did so by seeking to develop its technological capabilities, particularly the use of drones, so that it could enhance its military effectiveness. However, this came with a price tag, namely a lethal reaction by Israeli intelligence. The targeting of Hamas operatives engaged in such efforts has substantially increased in the past eighteen months.

On December 15, 2016, two assassins killed Mohammed al-Zawari, a Tunisian aviation engineer and a drone expert, near his home in Sfax, Tunisia. The Ezzeddin al-Qassam Brigades, the military wing of Hamas, mourned Zawari as one of its members. Zawari’s assassination also highlighted a largely under-reported element in Hamas, namely its recruitment of non-Palestinians in its military efforts.

This transnational link became more apparent after the temporary disappearance and subsequent arrest in the Philippines last January of Taha Mohammed al-Joubouri, a Hamas-linked Iraqi explosives expert. Once he was released by the Philippines, Joubouri travelled to Turkey, which then deported him to Iraq upon the request of the authorities there. Hamas sources told the pro-Hezbollah Al-Akhbar newspaper in Lebanon that Joubouri, who worked for the Iraqi defense industry until the U.S. invasion in 2003, had been lured into a trap near Manila by Mossad agents and then interrogated. According to the report, he belonged to the same “research unit” as Zawari. Al-Akhbar also reported that Hamas had later tried, through Iran, to secure Joubouri’s release in Iraq, but to no avail. Given Iran’s influence in Baghdad, this highlighted the continuing strains between Iran and Hamas, even months after Arouri had visited Tehran.

The pace of assassinations continued without interruption. Last January, Mohammed Hamdan, a Palestinian chemistry teacher affiliated with Hamas, survived a car bomb attack in Sidon in southern Lebanon. Weeks later, on April 21, Fadi al-Batsh, a Palestinian engineer with Hamas links, was gunned down in Kuala Lumpur, Malaysia, while heading to a mosque for dawn prayers. The New York Times quoted Middle Eastern intelligence sources as saying that Batsh “had been sent there to research and acquire weapon systems and drones for Hamas.” One intelligence official told the paper, “Hamas’s efforts to cultivate its scientists living abroad were directed from Istanbul, and […] Mr. Batsh was scheduled to meet with the head of the unit, Maher Salah, upon arrival in Turkey.”

Salah is an intriguing figure in this network. Previously, he was Hamas’ leading financial officer and was based in the Gulf, until his reported arrest in Saudi Arabia in 2015. Since then Salah, now identified as the leader of the organization’s external branch, has seemed incapable of maintaining a permanent residence, much like Arouri and his team.

Hamas’ difficulties have profoundly impacted the ideological and political pillars of the organization. In a surprise move, Hamas announced last year its acceptance of a two-state solution with Israel, based on the 1967 borders. And recently the organization’s leaders in Gaza expressed their willingness to negotiate a long-term ceasefire with Israel. While there is a difference between a two-state solution and an extended ceasefire, this change in Hamas’ attitude has been a good indicator of how the party has sought to break out of its isolation.

The slow process of reconciliation with Iran and Syria has opened Hamas’ eyes to reality. The Syrian conflict widened the gap of mistrust between Hamas on the one hand and Tehran and Damascus on the other, even if meetings and statements of solidarity have produced photo opportunities and rosy headlines. But Hamas prisoners are still languishing in Syrian and Iraqi jails, and individuals from the organization are being hunted down around the world. Sometimes the worst wounds can be self-inflicted.