Iran's President Mahmoud Ahmadinejad on Saturday congratulated Gaza's Hamas prime minister, Ismail Haniyeh, on a "great victory" over Israel, AFP reported.

According to the report, Haniyeh in turn "thanked Iran for its support," days after Tehran confirmed it had supplied military aid to Gaza.

"The Iranian president congratulated the people of Gaza and the (Palestinian) resistance facing Zionist aggression ... on their great victory," Iran's news agency ISNA reported.

Haniyeh’s office said Ahmadinejad called late on Friday to praise Gaza's "victory after eight days of Israeli aggression," referring to Israel’s Operation Pillar of Defense which targeted Hamas’s terror infrastructure in Gaza.

"We stand beside the Palestinian people," the Iranian president added.

Parliament speaker Ali Larijani on Wednesday said Iran had supplied military aid to Hamas, which controls Gaza since taking power in a bloody coup in 2007.

"We are proud to defend the people of Palestine and Hamas ... and that our assistance to them has been both financial and military," Larijani said in remarks reported by parliament's website, ICANA.ir.

Iran's Revolutionary Guards chief General Mohammad Ali Jafari also said on Wednesday that Tehran had provided the "technology" for the Fajr 5 missiles used to target Tel Aviv, but denied supplying the actual weapons.

He said they were being "rapidly produced" in Gaza.

Hamas leader Khaled Mashaal on Wednesday thanked Iran as well as Egypt for their support during the conflict, saying Iran "had a role in arming" the terror group.

Iran’s Saeed Jalili, secretary to the Supreme National Security Council, crowed on Iran's IRIB news on Friday that the ceasefire dealreached this week between Israel and Hamas “means that the Zionist regime is becoming increasingly weak.”

Jalili said the ceasefire admitted to Israel’s “accepting defeat.” Iran will continue to support terrorist groups in Gaza and elsewhere that fight Israel, he declared.