JERUSALEM — In the first hours after Hezbollah fighters captured two Israeli soldiers in a 2006 cross-border raid from Lebanon, Israeli Prime Minister Ehud Olmert made it clear that he wouldn't bargain for their freedom.
"We will not give in to extortion, and we will not negotiate with terrorists regarding the lives of Israeli soldiers," Olmert said as Israeli warplanes prepared to bomb Beirut nearly two years ago. "That was true yesterday, and it is true today."
In the coming days, if all goes as planned, Israel will complete a deal that does just that.
After the costly, 34-day war failed to cripple the militant group or secure the return of the captured soldiers, the two sides now have agreed to a prisoner swap that's meant to bring some closure in both countries. Israel will turn over a militant whom it's held 29 years and expects in return the bodies of the two soldiers, who Israel thinks are dead.
The deal is part of a broader strategic effort that Olmert has launched to try to strike deals with most of Israel's adversaries, including the militant group Hamas and Syria.
In reaching the deal with Hezbollah, Israel has reignited a debate about the war and the country's nebulous policy of dealing with its adversaries.
If Israel was going to end up cutting a deal with Hezbollah, did 160 Israelis — and more than 1,000 Lebanese civilians — die in vain during the war?
Won't freeing a notorious Lebanese killer as part of the deal encourage Hezbollah and other militant groups to try to capture more Israelis?
Is Israel making hollow promises when it vows never to negotiate with terrorists?
On the last point, as Hezbollah well knew when it captured the soldiers, the answer is yes.
Israel has a long history of cutting deals with its worst enemies.
In the last three decades, a McClatchy review found, Israel has released about 7,000 prisoners to secure freedom for 19 Israelis and to repatriate the bodies of eight others.
In past deals, Israel freed Hamas spiritual leader Ahmed Yassin, a Japanese Red Army militant and thousands of Palestinians who became leaders or street fighters during the first and second uprisings.
"We always say that we will not negotiate with terrorists, but we always do," Israeli historian Tom Segev said. "One of the reasons the government is so hesitant to make this deal is they feel that it highlights the failures of the war."
The unfolding deal is expected to provide Hezbollah with a significant public relations coup. As part of the agreement, Israel will free Samir Kuntar, a Lebanese militant who was captured in 1979 after he took part in a gruesome attack that ended with the deaths of four Israelis, including two young girls.
Then 16, Kuntar killed an Israeli man in front of his daughter, then smashed the 4-year-old girl's skull on beachfront rocks.
While Kuntar will be greeted in Lebanon by big celebrations led by Hezbollah leader Hassan Nasrallah, Israel is expecting to receive the bodies of Ehud Goldwasser and Eldad Regev, the soldiers whose capture sparked the 2006 war.
As Hezbollah rejoices, Israel will mourn.
That stark contrast has some Israeli military strategists worried that the decision to free Kuntar for the bodies of Israeli soldiers will embolden Hezbollah and other militant groups to keep using the same tactics.
"Is it worthwhile?" asked Yossi Kuperwasser, the retired brigadier general who served as the head of the Israeli military's intelligence branch during the 2006 war. "In my mind, strategically speaking, it's not worthwhile. We're giving the bad guys power and enough chips to get what they want. It's a pity. It's a real pity."
Kuperwasser and other critics worry that the deal will strengthen the hand of Hamas militants in their Egyptian-brokered talks with Israel over the release of Gilad Shalit, the Israeli soldier whom Palestinian militants from Gaza captured two weeks before the Lebanon war broke out.
Several factors came into play for Israel in the deal.
First and foremost, a mix of Jewish tradition and Israeli culture put tremendous pressure on Olmert to secure the release of the soldiers and hostages, dead or alive.
"You could see this as a weakness when you're dealing with Hezbollah and Hamas, who cynically exploit the pain, anguish and suffering of the families," Olmert spokesman Mark Regev said. "But you can also see this as a sign of strength that says something positive about Israel, our society and the value we place upon our people: You don't leave a soldier behind enemy lines."
Olmert also had to face an emotionally charged public-relations campaign led by the soldiers' relatives, some of whom called on Israel from the very start to free Kuntar.
And the prime minister is looking to secure diplomatic achievements that could help him rebuild his popularity as he tries to fend off a corruption investigation that's threatening to force him from office.
Efraim Halevy, the former head of Israel's spy agency, said the deal was unfortunate, but necessary to bring some closure for Israelis.
"If you want to get your men back, one way or another it will involve negotiation of sorts," Halevy said. "You can't get something back without dealing with the other side."
Halevy played a central role in one of Israel's most controversial deals while he served as the Mossad director in 1997.
After a botched attempt to kill Hamas leader Khaled Mashaal in Jordan, Israel agreed to released Hamas leader Yassin in exchange for two Mossad agents who were seized after the failed assassination attempt.
Before Israel then killed Yassin in a 2004 missile strike, he oversaw the Hamas suicide-bombing campaign during the second Palestinian uprising.
"No decision is devoid of danger," Halevy said.
In the coming days, the process is expected to begin with Hezbollah, through a German mediator, providing Israel with information on the fate of Ron Arad, an Israeli pilot captured in 1986 after his plane went down in Lebanon during a bombing run.
That's supposed to pave the way for Israel to pardon Kuntar and set the stage for the border exchange.
"Had we done a fantastic job in the war it would be much easier to pay the price," said Segev, the author most recently of "1967: Israel, the War and the Year That Transformed the Middle East."
"It's not a very good deal," Segev said. "It makes much more sense to exchange dead bodies for dead bodies. But it is an inevitable deal because of the emotional and irrational traditional values which direct many of our beliefs."