SHEAR YASHUV, Israel — Missiles fired by the Lebanese Hezbollah group struck an Israeli military convoy Wednesday, killing two soldiers in an apparent retaliation for a deadly airstrike attributed to Israel that killed six Hezbollah fighters in Syria earlier this month.

The violence was the deadliest Hezbollah attack against Israeli forces since a 2006 war between the two sides.

Israeli Prime Minister Benjamin Netanyahu said Israel would respond “forcefully” to the attack, and the military launched aerial and ground assaults on Hezbollah positions, including at least 50 artillery shells, according to Lebanese officials. A Spanish peacekeeper was killed in the border flare-up in southern Lebanon.

In a statement, Hezbollah said its fighters destroyed a number of Israeli vehicles that were carrying Israeli officers and soldiers and caused casualties among “enemy ranks.” The soldiers’ ranks were not immediately known.

Hezbollah said the attack was carried out by a group calling itself the “righteous martyrs of Quneitra,” suggesting it was in retaliation for an Israeli airstrike on the Golan Heights on Jan. 18 that killed six Hezbollah fighters and an Iranian general.

Ever since, Israel has braced for a response to the strike, beefing up its air defenses and increasing surveillance along its northern frontier.

The Israeli military said several anti-tank missiles hit an Israeli military convoy near Mount Dov and Chebaa Farms, a disputed tract of land where the borders of Israel, Lebanon and Syria meet. The two soldiers were killed in the strike and seven others were wounded, the military said.

About an hour after the attack, mortars were fired at several Israeli military locations on Mount Dov and Mount Hermon, the Israeli military said. No injuries were reported in that attack. The military said it responded with fire toward Lebanese positions, and evacuated Israeli visitors from a ski resort in the area.

The flare-up recalled the beginning of the month-long 2006 Israel-Lebanon war, which was sparked by a Hezbollah attack on an Israeli military vehicle along the border and the kidnapping and killing of two Israeli soldiers.

The Israeli military said there was no indication of any Israeli soldiers captured in Wednesday’s attack.

But the latest salvos raised the possibility of renewed fighting along the Lebanon-Israel border, which has remained mostly quiet since the 2006 war. Since then, Israel has responded with airstrikes and artillery fire following a number of rocket attacks and shootings, but the violence has remained contained.

Earlier Wednesday, Israel launched airstrikes in Syria targeting Syrian army artillery posts in response to two rockets that were fired from Syria the previous day into the Israeli-held Golan Heights. No casualties were reported in that exchange of fire.

Two Lebanese officials said the Israeli shelling targeted the border villages of Majidiyeh, Abbasiyeh and Kfar Chouba near the Chebaa Farms area. By afternoon, residents along the border reported the shelling had died down but that there were still Israeli aircraft flying overhead.

The Spanish Defense Ministry identified the dead peacekeeper as Cpl. Francisco Javier Soria Toledo, 36. Spanish Foreign Minister Jose Manuel Garcia-Margallo told reporters he received a phone call from Israel’s ambassador to Spain, offering condolences.

In a statement, Israel’s Foreign Minister Avigdor Lieberman said he conveyed Israel’s condolences for the death in a conversation with his Spanish counterpart.

Families living on the outskirts of the Lebanese villages fled farther within, fearing they’d be hit, said the two Lebanese officials, who are based in south Lebanon. Celebratory gunfire echoed in Shiite-dominated areas of Beirut, while in some areas, nervous parents hurried to pick up their children from school and hunker down at home.

Sounds of firing were heard near the Israeli village of Shear Yashuv, and there were plumes of smoke near Mount Dov. Israeli helicopters flew above and Israeli police and army units set up checkpoints on roads near the border, closing roads briefly.

Netanyahu, speaking at an event in southern Israel, warned that Israel’s enemies would face a fate similar to Hamas, the rulers of the Gaza Strip who fought a brutal 50-day war against Israel last summer.

“To anyone who is trying to challenge us on the northern border, I suggest looking at what happened here, not far from the city of Sderot, in the Gaza Strip. Hamas was dealt its heaviest blow ever since its founding and the Israel Defense Forces is prepared to act forcefully in all areas,” he said.

Israel Ziv, a reserve Israeli general and a former head of the IDF’s Operations Directorate, told reporters that the situation was “flammable” and that Israel should work to “contain” it.

“We could find ourselves in a war that does not belong to Israel,” he said.

“I do believe that Israel understands that it needs to contain it,” he said, adding Israel should not take any “steps that would pull us into the chaotic situation in Syria.”