power in the Mediterranean between 839 and around 1200. In 1086 it was made the seat of a bishopric by will of the Norman count Roger Borsa, as a counterweight to powerful Amalfi. In the 12th century it had some 25,000 inhabitants, and retains a disproportionate number of palazzi of the mercantile nobility, the Rufolo, d'Aflitto, Confalone and Della Marra. In 1137, after a first failed attack two years before, it was destroyed by the Republic of Pisa. After this event, it started a demographic and economical decline, and much of its population moved to Naples and its neighborhood.