THE RISE OF TOWNS AND GILDS 329 but were paramount in the Middle Ages when a town must not be too exposed to the attacks of invaders, pirates, or robber barons. Towns were therefore often located upon 'hills like castles. In any case they were enclosed by walls land could be entered only through guarded gates which |svere shut at night. Rivers were then more important paths }f trade than now, and many towns were located along their Danks, especially at fords, ferries, or bridges. In the declining Roman Empire and the early Middle ,ges men had sought protection and the means of subsist- ence from others and had commended them- Emancipa- >elves to the great and powerful. Now an oppo- tion of th e rite tendency becomes evident. Men feel able to pe ' ieed, clothe, and defend themselves, and are seeking free- dom from their lords. Individual serfs run away from their blasters and entire communities rise in revolt or bargain vith their lords for their collective freedom. There are races of this movement even in the tenth century. In 997 he peasants of Normandy made an organized though in- effectual revolt against their masters, and a few years later he Holy Roman Emperor, Otto III, issued a law to check he attempts of the unfree classes to escape from their ervile position. As the expansion of Western Christendom >rought new soil under cultivation and the owners of these lew estates offered favorable terms to attract tenants and abor, the lords of the older manors found it advisable to im- prove the lot of their peasants if they wished to keep them, "hey also seem to have discovered that ambitious free- aen work better than disheartened slaves. In the twelfth nd thirteenth centuries the practice spread rapidly among lanorial lords of emancipating their serfs in return for a considerable lump payment by the peasantry. In fact, so ttractive to the lords was this prospect of the immediate ayment of a large amount that they sometimes forced harters of emancipation upon communities of serfs who ad not asked for them. The granting of such a charter did not mean that the .easants would no longer work for, and pay rents to, the