Hamas leader Khaled Meshal warned on Tuesday that Islamist militant groups would back Iran if the Islamic Republic was attacked by Israel, Iranian state television reported.
"All Islamist militant groups will form a united front with Iran against Israel if it attacks Iran," Meshal told a news conference.
Israel and the United States have not ruled out military action if diplomacy fails to resolve the row over Iranian nuclear work that the West suspects is aimed at making bombs.
The Hamas leader added: "We are all parts of the same body... We all should fight against the mutual enemy. But how, the leaders will decide based on our capacities."
He further said that Israel was a danger for the Middle East region.
"God willing a regional resistance has the capacity to confront this danger," Meshal said in the televised news conference.
Israel cites Iranian President Mahmoud Ahmadinejad's repeated calls for the destruction of the Jewish state as a clear sign that Iranian nuclear weapons, if it acquires them, would threaten the country's existence.
Iranian Supreme Leader Ayatollah Ali Khamenei said Iran had no intention to end its support for Islamist guerrilla groups.
"Supporting Palestinians is our religious and national duty. We will continue our support and will never give it up," he said at a meeting with Meshaal, state television reported.
Last month, a senior Iranian cleric warned on Saturday that the country would fire missiles at Tel Aviv if attacked.
"If the enemy should want to test its bad luck in Iran, before the dust from its missiles settles in this country, Iran's ballistic missiles would land in the heart of Tel Aviv," said cleric Mojtaba Zolnour.
Want to enjoy 'Zen' reading - with no ads and just the article? Subscribe todaySubscribe now