Wow, I really enjoyed this passage. To summarize, a small city with a few people in it were besieged by a large army (sounds like the Alamo, eh?).
However, there lived in the city a man who was poor but wise and because of his wisdom (and I assume his cunning), the city figured out a way to thwart the enemy and survive.