"During this war and in the recent weeks, there was an exchange of messages between Iran and America," Hossein Amirabdollahian said through a translator at a press conference capping a day-long visit to Beirut.

He said the United States had asked Tehran to request Hezbollah, which is backed by Iran, "not to get widely, fully involved in this war against" Israel.

Hezbollah has exchanged near-daily fire with the Israeli military along the Lebanese-Israeli frontier to support its Palestinian ally Hamas, and has vowed to "fight to the end" should Israel launch a full-scare war on Lebanon.

Israel launched a war it says aims to destroy Hamas after the Islamist group staged a deadly cross-border assault on southern Israel on Oct. 7.

The conflict has rippled across the region and earlier this month Washington staged strikes against Iran-aligned groups in Irag, Syria and Yemen in retaliation for a deadly attack on U.S. troops in Jordan.

Amirabdollahian on Saturday warned Israel against taking any steps towards a broader war against Lebanon, saying that would be Israeli Prime Minister Benjamin Netanyahu's "last day."

He also said Iran saw a political solution as the only way to end the Gaza war.

"Iran and Lebanon confirm that war is not the solution, and that we absolutely never sought to expand it," Amirabdollahian told a news conference earlier on Saturday alongside his Lebanese counterpart, Abdallah Bou Habib.

He also said Tehran was in talks with Saudi Arabia on a political solution to hostilities in Gaza.

Hamas this week proposed a ceasefire of 4-1/2 months, during which remaining hostages held by Hamas would go free, Israel would withdraw its troops from Gaza and agreement would be reached on an end to the war.

Netanyahu called the Hamas terms "delusional" and vowed to fight on. But Amirabdollahian said Hamas was presenting ideas based on a "realistic view," and that they should be widely backed in order to end the war.

Amirabdollahian met on Saturday with Lebanon's caretaker prime minister, foreign minister, speaker of parliament and Hezbollah head Sayyed Hassan Nasrallah

Hezbollah's Al-Manar television outlet said the foreign minister and Nasrallah reviewed the latest developments in Gaza and southern Lebanon, including "the near future of the situation in Lebanon".

Amirabdollahian is set to travel on to Syria, according to Syrian media, and will meet top officials there.

Iran's Revolutionary Guards Corps have suffered one of their most bruising spells in Syria since arriving a decade ago to aid President Bashar al-Assad in the Syrian civil war.

Since December, Israeli strikes have killed more than half a dozen of their members, among them one of the Guards' top intelligence generals.

(Reporting by Maya Gebeily; Editing by Andrew Cawthorne and Frances Kerry)