In January, the two main Palestinian parties, Fatah and Hamas, agreed in Russian-sponsored talks to form a national unity government, ending a quasi-civil warinfo-icon that has lasted between them since 2007.

Although Russiainfo-icon, along with the United Statesinfo-icon, the United Nationsinfo-icon and the European Unioninfo-icon, has been part of the Middle Eastinfo-icon Quartet trying to resolve the Palestinian-Israeli dispute for 25 years, it seems interested in hammering out a unilateral endgame to the Palestinian crisis on its own.

Advising Russia on how to move forward on Palestinian politics are Iraninfo-icon and Syriainfo-icon, allies that have worked with Hamas for years. Once considered a major pillar in the Iran-led Axis of Resistance, Hamas defected in 2012 soon after the Syrian crisis erupted.

Convinced the regime of Syrian President Bashar al-Assad was about to collapse, Damascus-based Hamas chief Khaled Meshaal fled to Qatarinfo-icon. He started providing the armed opposition with weaponsinfo-icon and explosives at a Palestinian camp near the Syrian capital.

Meshaal had every reason to jump ship; he was a former member of the Musliminfo-icon Brotherhood, which had swept electionsinfo-icon in Egyptinfo-icon, Libyainfo-icon and Tunisiainfo-icon and was funded by his new host, Qatar, which was also the Syrian opposition's main backer.

Much changed over the next five years. Egypt's Brotherhood president, Muhammad Morsi, was toppled in 2013, the Islamic Stateinfo-icon emerged in 2014 and the Russian Air Force entered the Syria war in September 2015, allowing the Syrian regime to retake vast swathes of territory and empowering its allies in Damascus.

Hamas figures started scrambling for a U-turn and sent a senior delegation to the 37th anniversary of the Khomeini revolution, where they met with the commander of the elite al-Quds Force, Maj.-Gen. Qassem Soleimani, while showering Iran with praise on Hamas-affiliated television and radioinfo-icon.

Heavyweights in Hamas, such as Prime Minister Ismail Haniyeh, realized that Iran was vital for Hamas' survival. Iranian patronage of Hamas started as early as 1993, when the group was invited to open an office in Tehraninfo-icon after it opposed the Oslo Accords.

By 2007, Tehran was bankrolling the Hamas government with $120 million annually after the international community boycotted Gazainfo-icon. That year Hamas ejected the once dominant Fatah faction from Gaza after a brief conflictinfo-icon.

Over the last six years, Iranian funding dried up and was never matched by Qatar, Saudi Arabiainfo-icon or Turkeyinfo-icon. Gaza, ravaged by years of wars, siege and bad government, slumped deeper into poverty.

Youth unemployment stands at 60 percent, and 40 percent of Gaza's population lives below the poverty line, driving people to seek alternatives that might protect them and provide better leadership.

One ready substitute is a new generation of Hamas leaders, 10 years younger than Meshaal, headed by two commanders of the Izz ad-Din al-Qassam Brigade, Mohammed Deif, 52, and Yahya Sinwar, 56. The Syrian regime says Deif and Sinwar are strongly pro-Assad and are still backed by Tehran.

Unlike Meshaal, who was born in the Jordanian-controlled West Bank, grew up in relative comfort while he studied in Kuwaitinfo-icon and now lives at five-star hotels in Dohainfo-icon, these young leaders were born and have lived their entire lives in Khan Younis in southern Gaza, sharing the pain and plight of its people.

While they lead from below, creating an impressive power base for themselves in Gazan society, Meshaal comes across as disconnected and rather alien, addressing whatever supporters he still has via satellite.

Deif lost both his legs and Sinwar spent 22 years in prison, elevating them to iconic status among their peers.

If Damascus gets its way, one of these two men will replace Meshaal as leader of Hamas as a precondition for the group's return to Damascus. This, however, is unlikely to happen -- and Iran knows it -- because Israelinfo-icon will likely kill them before that happens.

The only other alternative for the people of Gaza is the recently emerged IS-affiliated militia called the Omar Hadid Brigades. It has procured sophisticated weapons from Libya, smuggled into Gaza from the Sinai peninsula, where IS has a heavy presence.

The IS militia in the Palestinian territories is composed of former Hamas fighters who know the city inside out and have access to its arms, storehouses and secret coffers. They also knew the homes of Hamas commanders and have started to go after them, accusing them of becoming too soft on Israel, especially after Hamas floated the idea of a 10-year truce with the Jewish state.

IS promises to deliver in Gaza where Hamas has failed and the more the enclave slips into poverty and chaos, the higher the defection rate will become and the more difficult it will be for any outside player -- be it Iran, Syria or Russia -- to gain a foothold in Palestinian politics.

Russia and Iran realize that time is not on their side in Gaza and are putting their full weight behind restructuring Hamas, accommodating its new generation, preventing defections to IS and restoring some normality to the territory.

This article originally appeared at The Arab Weekly.