Merchants of Amalfi were using gold coins to purchase land in the 9th century, while most of Italy worked in a barter economy. In the 8th and 9th century, when Mediterranean trade revived it shared with Gaeta the Italian trade with the East, while Venice was in its infancy, and in 848 its fleet went to the assistance of Pope Leo IV against the Saracens.
It was then an independent republic with a population of some 70,000, but in 1131 it was reduced by King Roger II of Sicily. In 1135 and 1137 it was taken by the Pisans, and rapidly declined in importance, though its maritime code, known as the Tavole Amalfitane, was recognized in the Mediterranean until 1570. In 1343 a large part of the lower town was destroyed by a tsunami.