- See also Duchy of Amalfi
First mentioned in the 6th century, Amalfi soon afterwards acquired importance as a maritime power, trading grain from its neighbours, salt from Sardinia and slaves from the interior, and even timber, in exchange for the gold dinars minted in Egypt and Syria, in order to buy the Byzantine silks that it resold in the West. Grain-bearing Amalfi traders enjoyed privileged positions in the Islamic ports, Fernand Braudel notes. The Amalfi tables (
Tavole amalfitane) provided a maritime code that was widely used by the Christian port cities. 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.
An independent republic from the 7th century until 1075, Amalfi extracted itself from Byzantine vassalage in 839 and first elected a duke in 958; it rivalled Pisa and Genoa in its domestic prosperity and maritime importance before the rise of Venice. In spite of some devastating setbacks it had a population of some 70,000 to 80,000 reaching a peak about the turn of the millennium, during the reign of Duke Manso (966–1004). Under his line of dukes, Amalfi remained independent, except for a brief period of Salernitan dependency under Guaimar IV.
In 1073 the republic fell to the Norman countship of Apulia, but was granted many rights. A prey to the Normans who encamped in the south of Italy, it became one of their principal posts. However, in 1131, it was reduced by King Roger II of Sicily, who had been refused the keys to its citadel. The Holy Roman Emperor Lothair, fighting in favour of Pope Innocent II against Roger, who sided with the Antipope Anacletus, took him prisoner in 1133, assisted by forty-six Pisan ships. The Pisans, commercial rivals of the Amalfitani, sacked the city; Lothair claimed as part of the booty a copy of the Pandects of Justinian which was found there.
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. A tsunami in 1343 destroyed the port and lower town, and Amalfi never recovered to anything more than local importance.
In medieval culture Amalfi was famous for its flourishing schools of law and mathematics. Flavio Gioia, traditionally considered the first to introduce the mariner's compass to Europe, is said to have been a native of Amalfi.
Amalfi has a long history of catering for visitors, with two former monasteries being converted to hotels at a relatively early date, the Luna Convento in the second decade of the 19th century and the Cappuccini Convento in the 1880s. Celebrated visitors to Amalfi included the composer Richard Wagner and the playwright Henrik Ibsen, both of whom completed works whilst staying in Amalfi. Author Gore Vidal was a long time resident.