It was the final day of the war, just before the United Nations (UN) ceasefire was due to kick in, and Israeli prime minister Ehud Olmert had a plan that he thought would snatch victory from the jaws of defeat.
He would airlift thousands of troops to the strategic Litani River, some 20 miles north of the border between Lebanon and Israel. He would then seize as much territory as possible, and only hand these positions over to the UN once the Israeli forces there had completed their work.
In military terms the plan was sound. But the war was decided by a power beyond the reach of Israel - the collective actions of the majority of ordinary Lebanese people.
As the Israeli army pushed forward on Sunday 13 August, they warned people not to return to their homes. These warnings were ignored.
In scenes reminiscent of the mass movement that forced the Israelis out of south Lebanon in May 2000, hundreds of refugee centres were abandoned the moment the ceasefire came into effect. A great mass of people was heading south - and the Israelis could do nothing about it.
The roads south of Beirut were clogged with families flashing victory signs, some packed seven to a car, and festooned with flags - both the Lebanese and the yellow of Hizbollah. “We’re going to the south,” they shouted. “Victory to Hizbollah.”
Gangs of local men along the route cleared paths by dragging away the piles of electrical cable, rubble and twisted metal that littered the highway. A new stream of cars would rapidly form through every breach in the rubble.
There were no army or police for miles along the damaged road south. It was the locals who directed traffic, guided cars past dangerous craters and pushed buses up dirt tracks around collapsed bridges.
As they neared their homes, the refugees would begin gathering on the outskirts of their villages and neighbourhoods to form great processions. Town after town, village after village was reclaimed. Powerless to confront this human wave, the Israelis abandoned their positions and began fleeing to the border.
This flood of people that proved so decisive in foiling the final Israeli offensive had emerged out of an unprecedented mass movement that grew up across the country as the bombs rained down.
This movement operated outside any official government organisation, and the initiative remained for the most part in local hands.
Chefs took over the kitchens of major hotels, feeding tens of thousands of people.
Neighbours would pass from house to house, collecting hot meals, clothes, baby milk and blankets. Doctors and medical teams opened temporary clinics while empty apartments were allocated to refugee families.
For over a month the Israelis had hoped that they could force Hizbollah to surrender by terrorising Shia Muslim neighbourhoods.
But these areas were emptied of their people. Though there were many tragic civilian deaths, Israeli warplanes would typically bomb areas that were already nearly empty.
This new movement was also marked by class. The newly reconstructed upmarket district of Beirut closed its doors - and its extensive network of underground shelters - to refugees. Government supplies of food and essential items were hidden away in warehouses or sold at exorbitant rates.
Nevertheless the civilian resistance was able to forestall a refugee crisis. Over a million people who had fled their homes were absorbed into schools, parks and private homes. They were fed, given clothes and kept safe from areas targeted by Israeli bombers.
With the active backing of so many ordinary people, the displaced become an organised mass of angry people, rather than desperate refugees. On the morning of the ceasefire they would have the final word.
Far from snatching a final victory, the Israelis had instead manoeuvred themselves into a dangerous trap. They were faced with a mass of people descending from the north - and Hizbollah fighters still in control of the south.
By the evening refugees reached the border town of Bint Jbail, the scene of some of the heaviest fighting during the war. The roads were too badly damaged by Israeli bombs, so they abandoned their vehicles and marched to the town on foot.
Wherever they found Israeli troops they would pelt them with stones and shout at them to leave.
Some Israeli units became isolated, while others retreated to the border. The “dash for the Litani” became a rout of the Israeli army.
As there was an official ceasefire, Hizbollah fighters found themselves having to escort isolated Israeli units to the border.
This was the final humiliation for one of the most powerful armies in the world - and it happened at the hands of the people.