By the ninth century the town has grown and is the seat of a viguerie, a mediaeval administrative court, and a centre for the production of lambskin gloves. At this time the town is surrounded by ramparts. The tenth and eleventh centuries saw the creation of the Viscount of Millau and subsequently passed to the Counts of Provence, the Counts of Barcelona and eventually, in 1112, to the father of the future King of Aragon, Béranger III following his marriage to the daughter of the Viscount of Millau. In 1187, the King of Aragon grants him the seal and communal freedom of Provence by Consular Charter. A consulate was thus created, and was responsible for administering the city to raise taxes and to apply justice. In 1271, Millau passed to the crown of the kings of France.