During the Middle Ages, feudalism was the law of the land. It was the basis by which the upper class maintained control over the lower class. It was constructed for one reason: security. The nobles wanted the security of maintaining control over their kingdoms, so they were forced to delegate power to local control. The peasants wanted security from barbarians from neighboring lands and from invading armies.