Relations between Hamas and Iran have strained in recent years over the Syrian conflict.
"Hamas' relations with Iran are fully recovering since the group’s recent internal election," Walid al-Mudallal, head of the Center for Policy and Development Studies in Gaza, told Anadolu Agency.
He blamed policies of oil-rich Saudi Arabia for pushing Hamas again toward Iran.
"There is a wave of hostility led by Saudi Arabia against Hamas, and it is logical for the group to look for backers," he said.
Shia Iran is a main backer of Hamas, which has ruled the blockaded Gaza Strip since 2007.
Relations between the two allies have strained in recent years after Hamas refused to support Syrian President Bashar al-Assad in the country's civil war.
Hamas further angered Tehran in 2012 when former group leader Khaled Meshaal left Tehran to live in Qatari capital Doha, resulting in Iran drastically reducing its support for the Palestinian group.
A short-lived rapprochement between Hamas and Saudi Arabia, an arch rival of Iran, has further worsened relations between Tehran and Hamas.
But relations between Hamas and Saudi Arabia nosedived again after a Saudi-led bloc imposed sanctions on Qatar in June, accusing it of supporting terrorism with Saudi authorities calling on Doha to halt support for Islamist groups as the Muslim Brotherhood and Hamas.
With the election of former Palestinian premier Ismail Haniyeh as new Hamas leader earlier this year, the group began to restore its relations with Iran.
In October, Hamas deputy leader Saleh al-Arouri visited Tehran for talks with Iranian officials.
And last week, al-Arouri visited Lebanon and met with Hassan Nasrallah, secretary-general of Hezbollah, a major ally of Iran, whose forces are fighting along Assad forces in Syria.
Support for the resistance
Al-Mudallal pointed out that Hamas has decided to restore its relationship with Iran, as the group "is not interested in adventure amid current Arab and regional conditions".
"Hamas would not receive financial or logistical support by other axes, unlike the Iranian axis which the group is not ready to lose," he said.
The analyst, however, said that Hamas was not interested in antagonizing other parties such as Saudi Arabia, Egypt and the United Arab Emirates.
Palestinian political analyst Mustafa al-Sawwaf cited relations between Arab states and Israel for pushing Hamas toward Iran.
"Hamas is seeking support for the resistance, something which Arab states don't respond do, while Iran does," he said.
"The resistance and interests of the Palestinian people are the factors that govern Hamas' relations with all parties," al-Sawwaf said.
He said Hamas, through its relations with Iran and Hezbollah, "was seeking to develop the military capabilities of the resistance".
"Hamas is looking for all forms of support for the resistance," the political analyst said.
Adnan Abu Amer, a lecturer in political sciences at the University of Ummah in Gaza, shares a similar opinion.
"Hamas sees an interest in maintaining strong relations with Iran with a view to obtaining financial and military support," he told Anadolu Agency.
He said the Palestinian group considers its relationship with Iran a "regional support" against rejection shown by key Arab states as Saudi Arabia.
He attributed the recovering relations between Hamas and Tehran to the "state of isolation Hamas had suffered".
"This has pushed the Palestinian group to get closer to the Iranian axis," he opined.
Abu Amer said Iran is also interested in restoring its relations with Hamas "with a view to repairing the Iranian axis, which includes Syria and Hezbollah".
"The region is witnessing an unprecedented polarization as part of the process of rearranging political axes or finding new axes," he said.
He, however, thinks that Egypt, for instance, will not tolerate Hamas' rapprochement with Iran. "This would create challenges for the group on how to maintain its relations with all competing parties," he said.
Egypt has recently sponsored a reconciliation deal between Hamas and its rival group Fatah of Palestinian President Mahmoud Abbas.
Ibrahim al-Madhoun, a Palestinian political analyst, believes that the Saudi-led Arab regimes were pushing Hamas away.
"This has pushed the Palestinian group to ally with Iran as a way to avoid regional isolation," he said.
Al-Madhoun believes that Hamas does not want to antagonize Saudi Arabia.
"Hamas will work hard to maintain a balanced relationship with all parties," he said. “Hamas does not want to clash with any country or be dragged into marginal conflicts."
"Hamas does not want to lose Saudi Arabia as an influential regional power, but it is forced to ally with those who support it with money and arms," he said.