Iranian officials said the only thing that would curb Tehran's retaliation against Israel was the establishment of a cease-fire in Gaza.
Iran has vowed a severe response to Hamas political bureau chief Ismail Haniyeh's killing, which took place as he visited Tehran late last month and which it blamed on Israel. Israel has neither confirmed or denied its involvement. The U.S. Navy has deployed warships and a submarine to the Middle East to bolster Israeli defenses.
One of the sources, a senior Iranian security official, said Iran, along with allies such as Hezbollah, would launch a direct attack if the Gaza talks fail or it perceives Israel is dragging out negotiations. The sources did not say how long Iran would allow for talks to progress before responding.
With an increased risk of a broader Middle East war after the killings of Haniyeh and Hezbollah commander Fuad Shukr, Iran has been involved in intense dialogue with Western countries and the United States in recent days on ways to calibrate retaliation, said the sources, who all spoke on condition of anonymity due to the sensitivity of the matter.
In comments published on Tuesday, the U.S. ambassador to Türkiye confirmed Washington was asking allies to help convince Iran to de-escalate tensions. Three regional government sources described conversations with Tehran to avoid escalation ahead of the Gaza ceasefire talks, due to begin on Thursday in either Egypt or Qatar.
"We hope our response will be timed and executed in a way that does not harm a potential ceasefire," Iran's mission to the U.N. said on Friday in a statement. Iran's foreign ministry on Tuesday said calls to exercise restraint "contradict principles of international law."
Iran's foreign ministry and its Revolutionary Guards Corps did not immediately respond to questions for this story. The Israeli Prime Minister's Office and the U.S. State Department did not respond to questions.
"Something could happen as soon as this week by Iran and its proxies... That is a U.S. assessment as well as an Israel assessment," White House spokesperson John Kirby told reporters on Monday.
"If something does happen this week, the timing of it could certainly well have an impact on these talks we want to do on Thursday," he added.
At the weekend, Hamas cast doubt on whether talks would go ahead. Israel and Hamas have held several rounds of talks in recent months without agreeing a final ceasefire.
In Israel, many observers believe a response is imminent after Supreme Leader Ayatollah Ali Khamenei said Iran would "harshly punish" Israel for the strike in Tehran.
"We are closely following what happens in Beirut and Tehran, and are working to thwart any (possible) threat, while also preparing a variety of offensive options," Israeli Defense Minister Yoav Gallant said during a visit to an intelligence base in Northern Israel.
"We are determined to fulfill our mission - we must ensure the safe return of (Israel’s northern) residents to their homes, once we ensure that Hezbollah withdraws north of the Litani River."
Iran's regional policy is set by the elite Revolutionary Guards, who answer only to Khamenei, the country's top authority. Iran's relatively moderate new president Masoud Pezeshkian has repeatedly reaffirmed Iran's anti-Israel stance and its support for resistance movements across the region since taking office last month.
Meir Litvak, a senior researcher at Tel Aviv University's Alliance Center for Iranian Studies, said he thought Iran would put its needs before helping its ally Hamas but that Iran also wanted to avoid a full-scale war.
"The Iranians never subordinated their strategy and policies to the needs of their proxies or protégées,” Litvak said. "An attack is likely and almost inevitable but I don't know the scale and the timing.”
Iran-based analyst Saeed Laylaz said the Islamic Republic's leaders were now keen to work toward a cease-fire in Gaza, "to obtain incentives, avoid an all-out war and strengthen its position in the region."
Laylaz said Iran had not previously been involved in the Gaza peace process but was now ready to play "a key role."
Iran, two of the sources said, was considering sending a representative to the cease-fire talks. However, they said the representative would not directly attend the meetings but would engage in behind-the-scenes discussions "to maintain a line of diplomatic communication" with the United States while negotiations proceed.
Iran's mission to the United Nations in New York told Reuters that Tehran would not have a representative present on the sidelines of the cease-fire talks. Officials in Washington, Qatar and Egypt did not immediately respond to questions about whether Iran would play an indirect role in talks.
Two senior sources close to Lebanon's Hezbollah said Tehran would give the negotiations a chance but would not give up its intentions to retaliate.
A cease-fire in Gaza would give Iran cover for a smaller "symbolic" response, one of the sources said.
Since Oct. 7, Israel killed nearly 40,000 Palestinians in Gaza, according to the health ministry.
Iran has not publicly indicated what would be the target of an eventual response to the Haniyeh assassination.
On April 13, two weeks after two Iranian generals were killed in a strike on Tehran's embassy in Syria, Iran unleashed a barrage of hundreds of drones, cruise missiles and ballistic missiles toward Israel, damaging two airbases. Almost all of the weapons were shot down before they reached their targets.
"Iran wants its response to be much more effective than the April 13 attack," said Farzin Nadimi, senior fellow with the Washington Institute for Near East policy."
Nadimi said such a response would require "a lot of preparation and coordination" especially if it involved Iran's network of allied armed groups opposing Israel and the United States across the Middle East, with Hezbollah the senior member of the so-called "Axis of Resistance," that along with Iraqi militias and Yemen's Houthis have harried Israel since Oct. 7.
Two of the Iranian sources said Iran would support Hezbollah and other allies if they launched their own responses to the killing of Haniyeh and Hezbollah's top military commander, Fuad Shukr, who died in a strike in Beirut the day before Haniyeh was killed in Tehran.
The sources did not specify what form such support could take.