The Israeli military offered a stark warning to Hezbollah and Iran on Saturday as the war in Gaza was just days away from completing its fourth month.

Israel Defense Forces spokesman Daniel Hagari addressed Hezbollah, saying that Israel will be "ready to attack immediately" if provoked, but said they do not wish for outright war.

"We do not choose war as our first priority, but we are certainly prepared," Hagari said."We will continue to act wherever Hezbollah is present, we will continue to act wherever it is required in the Middle East. What is true for Lebanon is true for Syria, and is true for other more distant places."

Israeli Defense Minister Yoav Gallant issued a similar warning this weekend, saying that even if Israel agreed to a cease-fire with Hamas, the IDF would not hesitate to strike Hezbollah if necessary.

ISRAELI FOREIGN MINISTRY CALLS FOR UNRWA COMMISSIONER TO RESIGN AMID ALLEGATIONS ITS WORKERS ASSISTED HAMAS

Israeli artillery

The Israeli military offered a stark warning to Hezbollah and Iran on Saturday as the war in Gaza was just days away from completing its fourth month. (AP Photo/Ohad Zwigenberg)

Israel will mark four months since it began its retaliatory campaign against Hamas later this week. Israeli officials have repeatedly warned that they expect the war to continue for "many more months."

ISRAEL TO BAN REBUILDING OF ISRAELI SETTLEMENTS IN GAZA FOLLOWING CONCERNS FROM BIDEN ADMIN

An Israeli intelligence official told reporters last week that Israel remains far away from achieving its stated goals of capturing Hamas' leaders and ammunition reserves and rendering Hamas military bases and tunnels inoperative.

Yahya Silwar

Hamas leader Yahya Sinwar remains at large, though he is believed to be somewhere within the network of tunnels beneath Khan Younis, the largest city in southern Gaza. (MAHMUD HAMS/AFP via Getty Images)

Hamas leader Yahya Sinwar remains at large, though he is believed to be somewhere within the network of tunnels beneath Khan Younis, the largest city in southern Gaza.

BIDEN SAYS HE'S DECIDED ON RESPONSE TO IRANIAN-BACKED MILITIA ATTACK THAT KILLED 3 US SOLDIERS IN JORDAN

Israel's warning this weekend comes as tensions between the U.S. and Iran threaten to boil over. Iran-backed terrorist groups have caused chaos throughout the Middle East since Hamas' Oct. 7 massacre in Israel, going so far as to kill 3 U.S. soldiers last week.

us soldiers killed in jordan

Iran-backed terrorist groups have caused chaos throughout the Middle East since Hamas' Oct. 7 massacre in Israel, going so far as to kill 3 U.S. soldiers last week. L-R: Sgt. William Rivers, Spc. Breonna Moffett, and Spc. Kennedy Sanders.  (Fox News )

CLICK HERE TO GET THE FOX NEWS APP

President Biden's administration has vowed a response, and Iran has likewise vowed to "decisively" respond to any U.S. attacks. U.S. Central Command said Friday that forces conducted airstrikes on more than 85 targets in Iraq and Syria against Iran’s Islamic Revolutionary Guards Corps (IRGC) Quds Force and affiliated militia groups.

The Associated Press contributed to this report