Israel’s foreign minister drew a line in the sand with Iran on Wednesday, warning the country that Israel would respond with direct attacks on Iranian targets if Iran launches an attack on Israel from within its territory.

The minister, Israel Katz, issued the warning after Iran’s Supreme Leader Ayatollah Ali Khamenei once again threatened retaliation for an Israeli airstrike that killed several top Iranian military officials in Syria last week.

"If Iran attacks from its territory, Israel will respond and attack in Iran," Katz said in a post on X.

Iran has long carried out attacks against Israel, but it has typically done so through proxy terrorist groups like Hamas, Hezbollah and the Houthis. It would be a major escalation in the conflict for Iran to attack Israel directly, and likewise for Israel to strike targets within Iran's territory.

ISRAELI POLICE THWART ALLEGED ISIS TERROR PLOT AGAINST JERUSALEM STADIUM, POLICE STATION

Israel Katz

Israel’s foreign minister drew a line in the sand with Iran on Wednesday, warning the country that Israel would respond with direct attacks on Iranian targets if Iran launches an attack on Israel from within its territory. (Dursun Aydemir/Anadolu via Getty Images)

The exchange of threats between Israel and Iran is the latest sign that Israel's war against Hamas could explode into a regional conflict, something the U.S. has sought to avoid.

IRAN'S FOREIGN MINISTER ACCUSES U.S. OF GIVING ISRAEL 'GREEN LIGHT' TO ATTACK CONSULATE IN SYRIA

While the U.S. remains a staunch ally of Israel, there is a widening rift between President Biden's administration and Israeli Prime Minister Benjamin Netanyahu's government.

Biden criticized Netanyahu's current plans for the war in Gaza as a "mistake" in an interview with Univision published Tuesday night.

Iranian leaders

The exchange of threats between Israel and Iran is the latest sign that Israel's war against Hamas could explode into a regional conflict, something the U.S. has sought to avoid. (Office of the Iranian Supreme Leader via AP)

"I think what he’s doing is a mistake," Biden told the outlet. "I don’t agree with his approach."

BIDEN WARNS NETANYAHU THAT US WILL CHANGE POLICY ON GAZA UNLESS ISRAEL PROTECTS CIVILIANS

Biden's criticisms have related largely to civilian casualties in Gaza, deaths which Israel insists it is doing all it can to prevent.

Joe Biden and Benjamin Netanyahu

While the U.S. remains a staunch ally of Israel, there is a widening rift between President Biden's administration and Israeli Prime Minister Benjamin Netanyahu's government. (Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

Democrats in Congress have gone so far as to call for Biden to withhold arms to Israel unless it does everything possible to limit civilian casualties on the battlefield. Last month, Senate Majority Leader Chuck Schumer, D-N.Y. called for Israel to hold new elections to replace Netanyahu, prompting backlash from Israeli officials.

Fox News' Louis Casiano contributed to this report.