After two years of disconnect with Iran following Hamas support for Syrian rebels, Gaza's rulers once again face off against Islamic Republic by backing Saudi-led military campaign in Yemen.

Elior Levy|Published: 03.29.15 , 15:02

Just as Hamas was finally beginning to mend ties with its Iranian patrons over its support for rebels fighting to oust Syrian President Bashar Assad, the Gaza rulers are once again testing their limits and risking another rift with Tehran by backing the embattled Sunni leadership in Yemen.

Hamas took a significant risk on Saturday, when it released a message of support for ousted the Yemeni president, Abd Rabbuh Mansur Hadi, and as a consequence its support for the Saudi-led military operation in Yemen against the Shiite Houthi rebels, Iran's allies, who have captured massive parts of the country and brought down the Sunni regime.

"Hamas is on the side of political legitimacy in Yemen and the Yemeni people's choice, which was made democratically," a Hamas statement said.

The Palestinian organization, which has been promised millions of dollars from Gulf states for the reconstruction of the Gaza Strip, stressed that it supports Yemen's unity and stability, and called for a national dialogue between the various factions in Yemen.

The Hamas statement might be using cautious, diplomatic language, but this is the second time the organization has come out strongly against Iran in a relatively short period of time.

The first time was two years ago, when Hamas expressed support for Sunni insurgents in the civil war in Syria. The group effectively turned its back on Assad and his regime in Syria - Iran's most important ally - and this cost Hamas dearly: Its politbureau officials were forced to leave Damascus, and relations with Iran and Hezbollah went into deep freeze.

In recent months, however, there has been a thaw in relations between Hamas and Iran, although it seems that the Hamas stance on Yemen will once again have major implications for the relationship between Gaza and Tehran. In its statement, Hamas also opted to stand by Qatar, currently the main donor for Gaza's reconstruction efforts.

Saudi Arabia and the Gulf states, accompanied by several other Sunni countries, launched a military offensive to bring down the Houthi rule in Yemen and restore the Sunni regime. The operation again split Arab and Muslim countries, with the Shiites and their allies supporting Tehran, and the Sunnis supporting Riyadh.

Iranian and Syrian ally Hezbollah was among the Shiite groups that came out in defense of Iran and the Houthi rebels this weekend. Hamas, on the other hand, is a Sunni organization.