You may have come across a famous photo, snapped shortly before the abduction of Israel’s most beloved corporal (since promoted to staff sergeant): Bespectacled, nerdy, Gilad Shalit smiles shyly, sporting a gun and fatigues that seem a bit too big for his 19-year-old body.

The price Israel made for the deal to release Shalit for more than 1,000 Palestinian terrorists will be debated for a long time. So why did Netanyahu agree to it?

Israel is a small country that compels every high-school graduate to serve in its army. Shalit has therefore preoccupied the national psyche for the entire half decade in which he’s been held incommunicado in Gaza since terrorists snatched him from a sentry post on June 25, 2006. Gilad was “son” to every Israeli parent.

When news emerged in Israel last month about — yet again — resumption of serious backroom negotiations, the real father, Noam Shalit, told me, “I hope so.” Ever the realist, he quickly added, “You know the rhythms of our region. Things go slowly. The media is always up front, way ahead of reality.”

Yesterday Aviva and Noam Shalit, who’ve led a dignified, relentless worldwide campaign for their son, folded the tent they’d planted in front of Netanyahu’s office, and returned home after more than a year to their small northern Israeli outpost, Mitzpe Hila.

Their plight is the country’s “soft belly”: Time and again, Israel’s enemies raised the price for Shalit’s release and reneged on previous deals, toying with emotions to maximize pain. Such cruelty will be even worse in the future, if they succeed in kidnapping more Israelis.

So how did German intelligence officer Gerhard Conrad, a veteran of Israeli-Arab backroom maneuvering, finally close the deal?

The terror organization Hamas is growing weaker. It has little to offer Palestinians in the long run beyond endless losing wars, and its sugar daddy, Syrian President Bashar Assad, may not last out the year. Meanwhile, its rival, Palestinian Authority President Mahmoud Abbas, is scoring international adulation, including standing ovations at the United Nations, for his (America-embarassing) bid for UN recognition of a Palestinian state.

Now pictures of mothers kissing sons who are almost as “heroic” as martyrs will be televised for days in the Palestinian territories. Hamas will be praised.

Khaled Mashal, Hamas’ political chief, knows a thing or two about backroom exchanges with Israel: In 1997, Mossad agents were caught in Amman after injecting a nerve toxin into his body. To secure the Israelis’ release, Jerusalem had to send Jordan an antidote to save Mashal’s life, even though he was high on its most-wanted list.

Will his current fortune last? Hamas can hope to gain even more prestige in the short run, as its mentors, the Muslim Brotherhood, surge in Egypt.

The Egyptian military, meanwhile, was instrumental in forging the Shalit deal, so it stands to gain some brownie points in Washington and elsewhere in the West, even as doubts about its ability to steer Egypt through its current turmoil linger.

Turkey too received a nod yesterday, as Israeli President Shimon Peres hinted that fiercely anti-Israeli Prime Minister Recep Tayyip Erdogan played a positive role in the swap, putting “humanitarian considerations ahead of politics.”

Abbas is a clear loser: His political rival was able to secure the prisoner release that his party, Fatah, had long sought. Worse: the most popular Fatah leader, Marwan Barghouti, convicted for organizing 37 terror operations in the early 2000s that killed 27 Israelis, will remain in jail.

Abbas, whose UN envoy, Riyad Mansour, refused to meet Gilad Shalit’s father last month, may rue his failure to become part of the swap. (Or he may secretly rejoice as Barghouti, a potential political rival, remains in jail.) Either way, he’s the odd man out in the Shalit deal.

So Hamas seems to emerge as the biggest winner from an exchange in which Israel releases 1,000 convicts who’ve committed bloody crimes (and may again), just to save one young man whose only “crime” was wearing that oversized uniform.

But look at the asymmetry from another angle: No politician can survive the Israeli public’s pressure to make such an exchange — and valuing the lives and welfare of its citizens so highly may be the main reason the besieged country has survived so long against such long odds, and may remain the key to its future prosperity.