?What is behind the Russia-Hamas rapprochement
In recent weeks there has been a considerable increase in the number of official high-level exchanges between the Russian government and Hamas. But could this deepening relationship help the latter break the isolation imposed on it by the United States and its allies?
In July, Hamas' Deputy Leader Mousa Abu Marzouk headed a delegation which visited Moscow and met with Russian Deputy Foreign Minister and Special Envoy to the Middle East and Africa Mikhail Bogdanov.
In mid-October, they met again in Doha, Qatar, and then a few weeks later the Russian envoy had a phone conversation with Hamas's chief, Ismail Haniya.
In these conversations the two sides reportedly discussed US President Donald Trump's so-called "deal of the century", and the reasons for Hamas's rejection of it.
Statements by various Russian officials appearing to criticise the "deal of the century" have been welcomed in both Gaza and Ramallah. In mid-October, Russian President Vladimir Putin said that his country would support any deal that would bring peace, but called Washington's proposal "pretty vague".
Russia appears to position itself as a competitor to the US in mediating between Israel and Palestine. For this reason, it is now eager to engage not just the Palestinian Authority (PA), but Hamas as well.
Russian engagement with the movement did not happen in a vacuum; over the past decade, it has maintained relations with its leadership. While the US and the European Union classified Hamas as a "terror group" from the get-go, Russia has maintained high-level contact with it since it won parliamentary elections and assumed control of Gaza in 2006.
Russia has justified this by pointing to the fact that Hamas is the elected representative of a significant section of Palestinian society and is represented in the Palestinian Legislative Council as well as Palestinian governments.
Moscow has also hosted several rounds of talks aimed at forging reconciliation between the Gaza-based group and Palestinian President Mahmoud Abbas's Fatah party over the years.
While Hamas has long enjoyed cordial relations with Russia, it still has a lot to gain from strengthening these ties further.
Russia is a major power with a permanent seat in the UN Security Council. It is also part of the Middle East Quartet working to resolve the Israeli-Palestinian conflict. In addition, Russia maintains close relations with the three actors that matter most to Hamas - Israel, the PA and Egypt. Russia could, therefore, help Hamas to not only stand up to Trump and his "deal of the century" in the international arena, but also resolve its issues with the PA and Egypt.
The leadership in Gaza knows that the Russian-Israeli relationship has grown stronger than ever before following the Russian intervention in Syria in 2015 and the opening of an operations coordination room for the Russian and Israeli armies to prevent incidents on the ground.
Yet, Hamas does not see the relationship between Russia and Israel as a hurdle to establishing a closer relationship of its own with Moscow. On the contrary, Hamas believes Moscow can use its ties to Israel to help the movement avert Israel's political and military attacks on Gaza.
Moreover, Hamas wants Russia to help it restore its relations with the Syrian regime, which broke down in 2012 when the former backed the Syrian anti-regime protests.
In this context, the intensified activity between Moscow and Gaza appears to be a big win for Hamas, which it believes can help bring an end to its political isolation and allow it to join the fold of legitimate representatives of the Palestinian people in the eyes of the international community.
There is, however, reason to be cautious when assessing the rapprochement's significance and durability.
Russia is keen on having more influence in the Middle East in general and in Palestine in particular. It believes breaking the American monopoly over the peace process is key to restoring its sway over the wider region. It wants to have closer relations with Hamas because it views the movement as a key actor in Palestine that is not under US influence.
Moreover, Moscow wants to use Hamas to develop closer relations with other Islamic political movements in the region, such as the Muslim Brotherhood.
Russia's rapprochement with Hamas cannot be seen as separate from its existing regional alliance with Iran. Moscow wants to line up as many powers as possible in the region to confront the US and to see Hamas take its place in the Iran-led axis formed against US allies in the region.
All this, however, does not mean Moscow is on the same page as Hamas when it comes to its vision for the future of Palestine. Unlike Hamas, Moscow calls for a two-state solution and opposes armed resistance. Moreover, as part of the Middle East Quartet, it calls for the recognition of Israel by all Palestinian factions.
All this raises serious questions about the prospect of a long-term partnership between Hamas and Russia that can offer real political benefits for the former.
In fact, Russia has already disappointed the movement on several fronts. The Hamas office in the Russian capital, for example, is still not "official" despite repeated demands from its officials. It has also so far done little to alleviate its international isolation.
While Hamas is undoubtedly going to benefit from having close relations with a superpower, Moscow is unlikely to be able to provide it with everything it needs, unless the movement itself agrees to make some compromises, including agreeing to a Palestinian state within the Green Line. That could cost it a lot of political capital on the ground and hurt its popularity among Palestinians, but it would help it emerge from international isolation and challenge the "terror" label.
The signs of improving relations with Russia already constitutes a serious breakthrough for the movement. But to be able to maximise its gains from this relationship and deepen its ties with Russia further, Hamas would need to take a pragmatic approach to international politics.