Then the Philistines went up, and encamped in Judah, and spread themselves in Lehi.
Everything went according to plan - up to a point.  The delighted Philistines (a thousand of them) confronted the three thousand men of Judah who were in the process of turning Samson over to his shouting enemies.  He had been securely bound (they thought) with two new ropes, but an almost incredible thing happened!