Hamid Reza Asefi, the foreign ministry spokesman said in a statement on Thursday faxed to journalists:"The Islamic republic of Iran congratulates Hamas and all the Palestinian soldiers and the great Islamic people."
Iran and Hamas are allies and declared in December that they represented a "united front" against Israel. "The Palestinians have voted for the resistance and have shown their loyalty," Asefi said.
"The result of these elections will reinforce the unity of the Palestinian people in defending their rights. The massive participation of the Palestinians shows their will to continue the struggle and resistance against occupation."
Although Iran is a vocal supporter of Hamas - as well as the Palestinian resitance group Islamic Jihad and the Lebanese Shia movement Hizb Allah - the clerical regime denies allegations it finances these groups.
But on 15 December, Khaled Meshaal, the Hamas political chief said during a visit to the Iranian capital that his group would step up attacks against Israel if the Jewish state took military action against Iran over its disputed nuclear programme.
"Just as Islamic Iran defends the rights of the Palestinians, we defend the rights of Islamic Iran. We are part of a united front against the enemies of Islam," Meshaal said during the visit.
"The Palestinians have voted for the resistance and have shown their loyalty"
Hamid Reza Asefi, Iranian Ministry spokesman
"Each member of this front defends itself with its own means in its region. We carry the battle in Palestine. If Israel launches an attack against Iran, we will expand the battlefield in Palestine," he said.
"We are part of a united front, and if one member of this front is attacked it is our duty to support them," he added, also praising Mahmoud Ahmadinejad, the Iranian President, for his "courageous" anti-Israeli stance.
Since sweeping to power in a shock election win last June, Ahmadinejad has embarked on an all-out verbal assault against Israel.
He has labelled the Jewish state as a "tumour" that should be "wiped off the map" or moved as far away as Alaska, and has branded the Holocaust a "myth".