JERUSALEM — Hezbollah fired antitank missiles into northern Israel on Sunday, prompting Israel to fire volleys of artillery against three villages in southern Lebanon in a sharp escalation of already high tensions.

Both sides of the border had been bracing for confrontation after a threat by Hezbollah to retaliate for the killing of two of its commanders in an Israeli airstrike in Syria the previous weekend. The Hezbollah strike, which targeted an Israeli military vehicle, fulfilled that threat, Hezbollah’s Al-Manar TV station said.

The encounter was intense but limited, and abated after about an hour. Neither side reported casualties, and there were no immediate indications that a further escalation was imminent. After Israel announced that it had stopped firing on Lebanon, there was relief that the widely predicted confrontation appeared to have been contained.

The exchange nonetheless showed the risk that long-running tensions between Israel and Iran, Hezbollah’s chief sponsor, could erupt into all-out war. It was the first exchange of fire across the tense Lebanese-Israeli border since Hezbollah and Israel fought a month-long war in 2006, and it threatened the fragile cease-fire that has held since then.

At stake is a wider competition being waged mostly in the shadows in which Iran is seeking to supply its ally Hezbollah with precision missiles capable of striking Israel and Israel is seeking to prevent it from doing so. In recent weeks, Israel has struck targets in Iraq, Syria and Lebanon in an attempt to prevent sophisticated weapons or parts that could be used for making them from reaching its borders.

Sunday’s encounter suggested both sides want to be seen as holding their ground while avoiding a larger conflict.

Hezbollah said two of its brigades had launched missiles against a tank and caused deaths and injuries among Israelis. Israeli military spokesman Lt. Col. Jonathan Conricus said the target was an unmarked military ambulance and there were no casualties.

The discrepancy in the accounts might be explained by claims in Israeli media Sunday night that Israel used decoy dummies splattered in red paint to convince Hezbollah that its strike had killed or injured Israelis. The claim, originally reported by public broadcaster Kan TV, was accompanied by footage showing the apparently injured Israelis on stretchers arriving at a hospital. Conricus declined to comment.

Conricus said Israel retaliated by firing about 100 shells into the area of southern Lebanon from which the attack was launched, in the vicinity of the town of Maroun al-Ras. Video footage from the area showed plumes of smoke rising from the mountainous countryside, suggesting most of the shells had landed in empty land.

The confrontation appeared to be over, Conricus said, but he said Israel would be on guard against any further Hezbollah retaliation in the coming days.

“The strategic situation is still ongoing,” he said.

Israeli Prime Minister Benjamin Netanyahu, who faces a contentious round of elections Sept. 17, appeared to taunt Hezbollah, boasting that the strike did not achieve its desired effect.

“We have no casualties, no injuries, not even a scratch,” he said in a statement. 

Hezbollah, however, hailed the strike on Israel as making good on the threat to retaliate by its leader, Hasan Nasrallah. Jubilant supporters took to the streets of Beirut’s Hezbollah-controlled southern suburbs in celebration, waving photographs of the two Hezbollah fighters whose deaths were avenged.

Nasrallah has threatened to retaliate separately for a drone attack on its stronghold in Beirut’s southern suburbs the previous weekend in which an exploding drone detonated and a second one crashed. Hezbollah has blamed Israel for the attack, which Israel has not denied.

Hezbollah will respond to that incident by shooting down an Israeli drone, Nasrallah said.

In a speech Saturday night, however, Nasrallah indicated that Hezbollah is in no hurry to take revenge for the drone attack, which came hours after the Israeli strike on Syria. He said Hezbollah had no intention of downing all the Israeli drones that almost constantly overfly Lebanon because to do so would “erode the defenses of the resistance.”

“We choose the time, we choose the place, we choose the circumstances,” he said. “But they should know this is a new phase and their unmanned planes are subject to being taken down.”

Lebanese politicians appealed for restraint and de-escalation. Prime Minister Saad Hariri called U.S. Secretary of State Mike Pompeo and an aide to French President Emmanuel Macron requesting their intervention to stave off further violence.

The United Nations, whose peacekeepers police the cease-fire in southern Lebanon, expressed concern that the flare-up risked unraveling a 13-year truce. However, the U.N. force said in a statement, “at this time calm has returned in the area.”

Sly reported from Beirut. Suzan Haidamous contributed to this report.