The term "March of Wales" was used in the Domesday Book of 1086. Over the next four centuries the Norman rulers established Earldoms for the "Marcher Lords", whose job it was to patrol the Marches. Dozens of small castles were built in the border area in the 12th and 13th centuries. From the castles the Norman lords could patrol and defend the area against against Welsh raiders and rebels.