The assault had the hallmarks of a revenge attack by tribesmen and armed men in the eastern city of Baalbek who are believed to be members of a tribe targeted in the crackdown.
They unleashed celebratory gunfire after hearing news of the army casualties.
Michel Suleiman, the president, urged the military "not to be lenient with the attacking criminals in order to defend the dignity of the army and the country and protect national peace.''
Hezbollah, the Islamist movement which is very influential in the valley, also expressed its "strong condemnation" of the attack and urged that action be taken against those responsible.
Ziad Baroud, the interior minister, said the attack will not deter the military from pursuing its campaign.
The army has bases in the region, and reinforcements of armoured vehicles and troops were sent to the area, and road blocks have been set up, witnesses said.
Preparations for parliamentary elections to be held in June have also renewed tensions.
On March 27, the army killed Ali Abbas Jaafar, a prominent drugs baron, and an aide in a stolen car after they refused to stop at a checkpoint in the valley.
Relatives of the two men later shot at an army vehicle. Three soldiers were lightly wounded.
Major drug producer
During the country's 1975-1990 civil war, Lebanon became a major drug producer and a transit point for international smugglers.
During that time the northern part of the Bekaa Valley was a major hashish producing region where the drug was grown out in the open.
In the 1990s, a strengthened government launched campaigns against the hashish
growers and smugglers which, coupled with pressure from the US, largely eradicated the trade.
However, although the government regularly cracks down on them, some people have continued to grow hashish in remote mountain areas near the border with Syria, particularly over the past two years amid political unrest.
The killing of the soldiers highlights the difficulty in bringing stability to a nation still affected by the divisions that triggered the country's civil war.
Monday was the 34th anniversary of the start of the conflict.
Hundreds of people marked the anniversary with calls for unity between Christians and Muslims at a one-time front line in downtown Beirut's Martyrs' Square.
Sectarian tensions resulted in street violence in Beirut last May that killed 81 people.
Last September, four soldiers and three civilians were killed when an explosion ripped through a military bus in the northern port city of Tripoli.
A similar attack in mid-August killed 14 people, including nine soldiers and a child.