"In medieval Europe, an oath of fealty (German: Lehnseid) was a fundamental element of the feudal system in the Holy Roman Empire. It was sworn between two people, the obliged person (vassal) and a person of rank (liege lord)."
Don't remember the exact date or edict name, but when in the Roman Empire a law was introduced banning debtors from moving too far from their creditors - that's when according to many historians Middle Ages have started.