The name Massa appears for the first time in a document of the 10th century AD on a list of castles and courts sold to the cleric Ropprando by Lambert, Margrave of Tuscany, on April 18, 973 and subsequently repaired by Ermengarda, widow of Lambert, on February 15, 986. In the 11th century began the gradual transfer to Massa Marittima of the episcopal seat of Populonia, which had been looted by pirates and destroyed by the fleet of Nicetas, Prefect of Constantinople: a letter from Pope Alexander II to Bishop Tegrin of 1062 testifies the transfer of the bishopric to Massa. The city reached the peak of its splendor in the years when it became free commune (1255-1337), with a great urban expansion including buildings still visible today.