The Islamic republic has lauded the "success" of the October 7 attacks by Palestinian Hamas militants that Israeli officials say killed 1,400 people, mostly civilians, with 230 hostages taken.
Tehran has also condemned as a "genocide" Israel's heavy retaliatory bombardment of the blockaded Gaza Strip, which the Hamas-run health ministry says has killed more than 8,000 people, also mostly civilians.
But, aside from its strong anti-Israel and anti-US rhetoric -- which have been at the heart of Iran's foreign policy since the 1979 Islamic Revolution -- it remains unclear how far Iran would be willing to go in case of a wider escalation.
Since the outbreak of the Gaza conflict, Tehran has repeatedly declared that it opposes the conflict's expansion to other parts of the Middle East, while also denying involvement in the October 7 attacks.
Western and Israeli leaders have also said there was no evidence Iran was directly involved.
Israel's Prime Minister Benjamin Netanyahu on Saturday accused Iran of supporting Hamas and supplying "over 90 percent" of its military budget but also said he had no evidence it was "involved in the micro-planning" of the October 7 attack.
"Iran is not interested in entering this war directly," judged Iranian journalist and international relations expert Hadi Mohammadi.
Sara Bazoobandi, research fellow at Germany-based GIGA Institute for Middle East Studies, agreed.
"The Iranians made it clear from the outset that they do not want direct involvement or confrontation," she said.
- 'Risk of spillover' -
The Iran-backed Hezbollah in Lebanon has issued similar warnings as Tehran and traded cross-border fire with Israel.
Bazoobandi said that "Iran keeps warning about the involvement of Hezbollah and other elements of the so-called 'resistance front.'
"They have been careful in formulating the wording in these warnings. One of the major reasons is that the threat is quite serious."
Still, the Islamic republic has cautioned against a full-blown ground invasion of Gaza by Israeli forces which have so far made limited incursions.
President Ebrahim Raisi said Sunday Israel's actions "have crossed a red line" which "may force everyone to take action."
In an interview with Al Jazeera, Raisi said Iran sees it as "its duty to support the resistance groups" but insisted that they "are independent in their opinion, decision and action."
Bazoobandi said Iran "will not abandon that (anti-Israeli) narrative, but at the same time they have been trying to distance themselves from this crisis, because of the high risk of spillover.
"Iran may see a spillover as a threat to its influence in the region and a potential threat to its territories."
Iran's public assertions appear to counter accusations by the United States which blamed Iran-backed militant groups for targeting its troops in Syria and Iraq, wounding some 20 US soldiers.
Washington has recently deployed two aircraft carrier groups into the eastern Mediterranean in a move it says aims to deter Iran and Hezbollah from getting involved in the Israel-Hamas war.
On Thursday, the US military said it had struck two facilities in eastern Syria used by Iran's Islamic Revolutionary Guard Corps and affiliated groups.
- 'High cost' -
Bazoobandi said one of Iran's main security doctrines has for decades been to "keep the conflict away from its own borders."
But, "to maintain its position in the region," Iran "will have to support its proxies during this crisis," she said. "This might come with a high cost."
Iran has threatened Israel with a "devastating response" if it were to attack its territory.
Mohammadi believes that Iran is only likely to engage in direct conflict "if Israel attacks the Iranian territory or Iran's strategic interests in other countries."
During recent military drills in central Iran, Defence Minister Mohammad Reza Ashtiani warned that "any inconsiderate act against Iran will provoke a strong reaction."
Analysts however believe that the Israel-Hamas war has already achieved goals long coveted by Tehran, including derailing any looming normalisation between Israel and Saudi Arabia.
Bazoobandi said that "the most important aim of Hamas' attack on October 7, in my opinion, was to humiliate Israel's security services, and Iran has praised Hamas for this."
For Iran, she said, "observing this humiliation would suffice, without further escalation".