Iran's leaders promised support for Hamas and urged it to continue its resistance against Israel, state TV reported on Sunday.
Supreme Leader Ayatollah Ali Khamenei told Hamas' Ismail Haniyeh that Iran would always stand by Palestinian "resistance" against Israel and warned him against "compromisers." President Mahmoud Ahmadinejad said it was Iran's "duty" to stand by the Palestinians.
The hard-line remarks come as Iran watches with concern attempts by Hamas to move closer to wealthy Gulf Arab states. Widened support for Hamas in the Arab world may come with demands that the Islamist movements moderate and not embarrass its new patrons.
Israel and Iran consider each other archenemies. Israel has not ruled out a strike against Iran's nuclear program, which it says is aimed at developing weapons technology. Iran denies this and says the program is for peaceful purposes.
Khamenei, who has a final say on all state matters, was quoted as telling Haniyeh that people expect Palestinian resistance to continue.
"People do not expect anything except endurance from Palestine's resistance," Khamenei was quoted as saying. He said the movement "should be watchful about influence of compromising elements … since the outbreak of sickness is gradual."
Khamenei said the late Palestinian leader Yasser Arafat lost his popularity because he distanced himself from resistance. "Resistance attracts people, and it is a big resource that should be protected," he said.
The Supreme Leader said Iran would always "stand by the people of Palestine and the resistance movement."
On 3 February, Khamenei affirmed that Iran had provided support to Hamas — a well-known policy, but one that Iranian leaders rarely state explicitly.
Haniyeh was quoted as saying that Iran was a "strategic reserve" for the Palestinians, and that Hamas would continue a strategy consisting of the "liberation of all the Palestinian lands, the pursuit of resistance and the rejection of peace talks."
Haniyeh also met Ahmadinejad on Sunday. The president was quoted as saying that support for Palestine was a task for all Muslims. "As its duty, the Iranian nation has stood next to the oppressed nation of Palestine."
The remarks come as Hamas' top leader in exile, Khaled Mashaal, leads what appears to have been a political shift.
He has pursued reconciliation with his Western-backed rival, Palestinian President Mahmoud Abbas, a longtime proponent of negotiations with Israel, and has argued that non-violent protests are an important tool in resisting Israeli occupation.
Haniyeh arrived in Iran on Friday for a three-day visit. The visit was seen an attempt by the Palestinian militant movement to avoid snubbing Iran, the group's longtime patron, even as it cultivates ties with the wealthy Gulf.
Some in Hamas want to be part of the broader Islamist political rise triggered by last year's Arab Spring uprisings. For this, Hamas needs new friends among Gulf states at odds with Iran.
But others in the movement may wish to maintain the relationship with Tehran, which helped Hamas when it had few friends in the Arab world.