DUBAI (Reuters) - Iran is ready to strike the United States and Israel if they give it any reason to do so, the head of the elite Revolutionary Guards said in a live speech on state television on Thursday.

Slideshow ( 2 images )

“If you make the slightest error, we will hit both of you,” Major General Hossein Salami said at a ceremony marking the 40th day since the death of top commander Qassem Soleimani.

Soleimani, who was head of the Quds Force, a branch of the Guards responsible for operations outside Iran, was killed by a U.S. drone in Baghdad on Jan. 3 along with Iraqi militia commander Abu Mahdi al-Muhandis.

The killing of Soleimani will lead to the liberation of Jerusalem, the spokesman for the Revolutionary Guards said earlier, according to the Tasnim news agency.

“The cowardly and craven assassination of commander Soleimani and Abu Mahdi al-Muhandis by the Americans will lead to the liberation of Jerusalem, by the grace of God,” Ramezan Sharif said.

Iran’s Supreme Leader Ayatollah Ali Khamenei said last week that Iran would support Palestinian armed groups as much as it could and urged Palestinians to confront a U.S. plan for Israeli-Palestinian peace.

U.S. President Donald Trump announced a plan that would set up a Palestinian state with strict conditions but allow Israel to take over long-contested Jewish settlements in the occupied West Bank. Palestinian leaders reject it as biased toward Israel.

On Thursday, Iranian state TV aired an interview with Hezbollah leader Sayyed Hassan Nasrallah in which he described a close relationship with Soleimani, highlighting the key role Soleimani played in helping build up Hezbollah’s rocket arsenal as well as his role in military operations during Hezbollah’s war with Israel in 2006.

Founded by Iran’s Revolutionary Guards in 1982, Lebanese group Hezbollah is a critical part of an Iranian-backed regional military alliance.

Soleimani also played an important role in Iraq’s battle against Islamic State, Nasrallah said, and asked for Hezbollah operational commanders to work with Iraqi security forces in battling the militant group when they first blazed across large swathes of Iraq in 2014.

Separately, Soleimani urged Iranians to support Khamenei and said political factions should put aside their differences. He made the call in his will, which was read by the new Quds Force chief, Brigadier General Esmail Ghaani, at a ceremony in Tehran.