The island was well known in to the last century for the iron resources. Mines were created by the Etruscans first and (after 480 BC) the Romans. After the end of the Roman Empire, the island knew barbarians and Saracens. In the early 11th century it became a part of the Republic of Pisa. In 1398, was sold to the Visconti family of Milan. After a few years, the island was acquired by the Appiani, Lords of Piombino, who kept it for two centuries. In 1546 part of the island was controlled by Cosimo I de' Medici. He fortified Portoferraio and renamed it "Cosmopoli". In 1577, the rest of the island was returned to the Appiani. In 1603 Philip II of Spain captured Porto Azzurro and built two fortresses there.