In 1073 that the Count of Die(t)z was mentioned for the first time in a deed of sale for goods in Bodenheim. Early references show that Heinrich II von Diez (1145–1189) accompanied Frederick Barbarossa on his Italian campaign where he was involved in diplomatic negotiations. His son Henry III was part of the regency council and circle of tutors of for Henry VII, which seems to indicate an atmosphere of growing influence for the town. The Graf Gerhard IV (1276–1308) founded in 1289 a collegiate at the foot of the castle hill. The founding community came from the Abbey of Salz. The monastery was named "Saint Mary's" after the patron saint of the church. The town continued to prosper. By 1329, Ludwig of Bavaria bestowed the right of municipal law to Diez, and at that time the town was fortified with a wall with five entry gates.