After Israeli forces were hit by missile fire, they responded by firing shells into southern Lebanon.
The UN Security Council is to discuss the fighting at an emergency meeting called by France in New York.
A senior UN official on the ground in Lebanon urged “maximum restraint to prevent an escalation”.
Israeli Prime Minister Benjamin Netanyahu held an emergency security meeting and said the attackers would “pay the full price”.
The cross-border violence erupted when Israeli military vehicles were struck by anti-tank missiles at about 11:35 (09:35 GMT) near Mt Dov, in the Shebaa Farms area, a tract of land where the borders of Israel, Lebanon and Syria meet.
Two soldiers died in the attack. Hezbollah said it was retaliation for an Israeli air strike that killed six of its fighters and an Iranian Revolutionary Guards general in the Syrian Golan Heights 10 days ago.
Air and ground
Seven other Israeli soldiers were injured, two of them moderately.
Just over an hour later, mortars hit an Israeli military position on Mt Hermon, prompting troops to close the site and evacuate civilians from a ski resort in the area.
Israel struck back with combined aerial and ground strikes on Hezbollah operational positions along the border, the military said.
At least 50 artillery shells were fired at the villages of Majidiyeh, Abbasiyeh and Kfar Chouba, according to Lebanese officials.
Later, the UN Interim Force in Lebanon announced that one of its peacekeepers had been killed close to the Shebaa Farms area.
The defence ministry in Madrid identified the dead man as a Spanish soldier who had been at a position near the village of Ghajar.
The UN special co-ordinator for Lebanon, Sigrid Kaag, expressed “deep concern over the serious deterioration of the security situation” and “urgently called on all parties to refrain from any actions that could destabilise the situation further”.
Edmond Mulet, assistant secretary-general for UN peacekeeping operations, is to brief the Security Council in closed consultations.
Analysis: Jim Muir, BBC News, Beirut
After Israel’s surprise air strike inside Syria on 18 January, it was clear that Hezbollah and its Iranian backers would feel obliged to respond. The question now is whether the two sides will regard honour as satisfied by their responses so far.
Everyone is mindful of the Hezbollah-Israel war of 2006, which lasted a month and caused death, destruction and disruption on both sides of the border without either side clearly winning.
The feeling is that neither Hezbollah nor Israel has much interest in an escalation to that point. Hezbollah is already heavily embroiled in the war in Syria.
Israel’s leaders face general elections in March. They could benefit if a robust response was seen to punish Hezbollah without repercussions, but a disruptive war could backfire at the polls.
‘Criminal terror attack’
Mr Netanyahu said Israel was “prepared to act powerfully on all fronts”, adding, “Security comes before everything else.”
His office accused Iran, Hezbollah’s main backer, of being behind a “criminal terror attack” by the Shia Islamist movement.
In a statement, Hezbollah said the attack had been carried out by a cell calling itself the “heroic martyrs of Quneitra”, an apparent reference to an area of the Syrian Golan Heights where the Israeli air strike took place on 18 January.
Sources in Israel say that attack was aimed at stopping an attack on Israeli soil.
The Israeli military boosted its air defences and stepped up surveillance along its northern frontiers after Hezbollah and Iran vowed to seek revenge.
Earlier on Wednesday, Israeli aircraft bombed Syrian army artillery positions in response to two rockets that were fired the previous day into the Israeli-occupied Golan Heights.
Israeli medics said up to seven people were lightly injured by the rocket fire.
What are the Shebaa Farms?
- The farms cover an area about 14km (9 miles) long and 2.5km wide, to the south of the Lebanese village of Shebaa, on the western slopes of Mount Hermon/Jabal al-Sheikh
- The area has been a flashpoint for violence since Israeli forces withdrew from Lebanon in 2000
- Until the 1967 Middle East war, the farms were under Syrian control, but the farmers had Lebanese citizenship
- The area was captured by Israel and annexed in 1981 along with the rest of the Golan Heights, a move not internationally recognised
- The Lebanese government says the farms are part of its territory, a claim backed by Damascus, but not the UN
- Hezbollah has consistently used Israel’s presence in the area as justification for retaining its weapons and continuing “resistance”
Source: BBC News