Before Israel invaded the Gaza Strip, Hamas vowed to turn the territory's treacherous landscape of alleyways and refugee camps into a "graveyard" for Israeli soldiers. Israel's military braced for dozens of fatalities.
But the results were markedly different. Hamas fighters put up little resistance to Israel's crushing offensive, and Israel's military - still smarting from its painful stalemate against Hizbullah in 2006 - emerged relatively unscathed and with new confidence.
Israel wrapped up its three-week offensive over the weekend, leaving behind widespread devastation and a death toll of more than 1,250 Palestinians, according to local medical officials. In contrast, Israel suffered just nine combat deaths, four of them from "friendly fire."
To be sure, Hamas' battlefield losses could be canceled out by other gains, depending on how the postwar politics play out. By standing up to Israel and firing hundreds of rockets deep into the Jewish state throughout the fighting, the Islamists appear to have boosted their standing, especially in the Arab world.
Yet soldiers returning from the battlefield said they were surprised by the lack of resistance from Hamas, a group that receives backing from Iran and had vowed to inflict heavy pain on IDF troops.
In an interview, one IDF infantry reservist who fought in Gaza said he and his comrades experienced only light combat during over a week inside. They took no casualties.
"There was some sniper fire and a few mortar shells, but face-to-face - nothing like that," he told The Associated Press, crediting the army's use of overwhelming firepower. The infantry were backed by tanks, artillery and airstrikes as they made their way into Gaza.
He spoke on condition of anonymity because army regulations prohibit soldiers from giving interviews.
"We set a date with Hamas, and they didn't come. They were afraid to come and face us, and they ran away," an unidentified soldier told Army Radio on Monday morning from an encampment just outside Gaza.
Whatever the reason, Hamas fighters - using booby traps, missiles, mortar shells and light weapons - inflicted little damage to the invading troops. For a guerrilla group operating on its urban home turf, it wasn't much of a fight.
One senior Israeli officer said Israel partly owed its light casualties to luck. He mentioned a company of infantry troops from the Givati Brigade who spent the night in a commandeered school.
In the morning, a soldier who went to urinate in a corner discovered the wire of a bomb that was supposed to blow the building up. The gunmen who were to have pressed the detonator seem to have fled before the soldiers arrived, the officer said.
Israel's military expected much fiercer fighting and dozens of Israeli fatalities, according to Israeli defense officials.
Despite its battlefield losses, Hamas remains firmly in control of Gaza, and the fact that the group even took on Israel is likely to boost its standing with much of the public. Throughout the fighting, the group managed to keep firing rockets and hit deeper than ever inside Israel - perhaps its main military achievement.
Hamas claims its fighting strength is intact.
Ismail Haniyeh, the Hamas prime minister of Gaza, declared a "heavenly victory" Sunday in an address televised from his hideout. And Abu Obeida, a spokesman for Hamas' military wing, claimed at a news conference Monday that fighters had killed no fewer than 80 Israeli soldiers and shot down four helicopters.
"We did not kneel down, we did not surrender, we did not raise the white flag," Abu Obeida said.
The Israeli army called his account "completely wrong."
Inside Gaza, sealed in by Israel and encumbered by poverty and hopelessness, many credit Hamas with a brave stand.
"There was a world war against Gaza. We, at least, were happy that somebody was able to retaliate," said Hatem Wahdan, a 49-year-old from the northern town of Jebaliya who spent much of the fighting seeking refuge in a UN school.
Still, the events of the past weeks could have a long-term impact on the group's standing among Palestinians and abroad, said Jamil Rabbah, director of Near East Consulting, a Palestinian polling institute based in the West Bank.
"What I've been seeing in many Internet chat rooms over the past two or three days is: Where is Hamas? ... What happened?"
Hamas' results were far short of Hizbullah's performance in its 2006 war against Israel.
The Lebanese group killed 120 Israeli troops in a month of hit-and-run fighting in south Lebanon and an additional 40 Israeli civilians in rocket attacks, in the process becoming the subject of adulation in the Arab world.
Hizbullah has far more freedom of movement than Hamas and better equipment. But backed by Iran and motivated by radical Islamic theology, the two groups had become conflated in the minds of Israelis. That view was further fueled by military intelligence reports that Hamas had turned itself from a ragtag militia into a Hezbollah-style force of many thousands that prepared fortifications and booby-traps to greet invading Israeli troops.
During the fighting, Hamas sent out text messages to reporters claiming fighters destroyed tanks and armored personnel carriers, blew up a house full of Israeli troops, and captured two soldiers. All of those things were successfully accomplished by Hizbullah in 2006. None were true this time.
Both sides have an interest in inflating the results of the Gaza fighting: Hamas wants to avoid the humiliation of having appeared weak, while Israel wants to give the impression that it crushed a formidable foe.
"Whoever reads the Israeli media would think the military fought the most glorious war in its history, but that isn't accurate. There wasn't even one battle," said Israeli military analyst Reuven Pedatzur.