The duchy of Naples included the coast and islands of the Bay of Naples, the Terra di Lavoro inland and the outlying towns of Sorrento, Amalfi and Gaeta. Little is known of its history in the seventh century, and the traditional view that its first local dux was Basilius, confirmed by Constans II around 661, is now rejected. Its institutions followed the usual Italian model, with a concentration of power and property in the military elite of the exercitus, but its loyalty to the empire was consistently greater than that of the territories to the north, probably because of its maritime links with the east and the need for imperial protection against the constant threat posed by Lombard Benevento. Thus the Neapolitans allowed the exarch Eutychios to disembark in their city in 727, when most of Byzantine Italy was in revolt. The duchy was also sympathetic to the Isaurian policy on images, to the extent that the episcopal see was held by an outright iconoclast, Calvus, between 750 and 762. The duchy was unaffected by the fall of Ravenna in 751, having come under the nominal authority of the strat¯egos of the theme of Sicily for several decades. Nevertheless, Naples experienced the same trend towards increased autonomy as other areas, and by 755 it had its first locally elected dux, Stephen. After his election as bishop in 767, Stephen was able to pass on the ducal office to his two sons, Gregory and Caesarius, in succession, and then to his son-in-law Theophylact. As in Venice, relations with the empire oscillated considerably, probably as a reflection of the ascendancy of rival factions. While the duchy supported the strat¯egos of Sicily in opposing papal claims to Campania in 779/80, in 812 Duke Anthimus refused to send his fleet to help his nominal superior, the strat¯egos, fend off an Arab raid on Ischia. In 818 the citizens of Naples petitioned the strat¯egos of Sicily to appoint a dux to govern them, but in 821 one such imperial appointee was deposed in favour of a candidate from the family of Stephen.However, the decisive stage in the detachment of Naples from the empire came with the Arab invasion of Sicily in 827, when the strat¯egos was too preoccupied to intervene in the duchy and Naples was left to its own devices to resist the growing pressure from the Arabs by sea and the Lombards on land. As an example of the delicate balancing act required, Duke Andrew employed Muslim mercenaries in 835 against Prince Sicard of Benevento (833–9) and then gave his allies help in conquering Messina from the empire in 842/3. Although Naples attracted considerable criticism for these opportunistic alliances with the infidel, the strengthened position thus attained enabled Andrew to conclude a favourable treaty with the Lombards in 836 (the pactum Sicardi), and in 839 Lombard pressure was for a time alleviated by the civil war which split the Lombard principality into two parts, Benevento and Salerno. Later, in the 840s, Duke Sergius, together with his son, the consul Caesarius, turned against the Arabs and won a series of victories culminating in the battle of Ostia in 849. Later, however, the Neapolitans established friendly relations with the Saracens, perhaps in order to prevent raids from Muslim strongholds such as Taranto. These tactics, while necessary to safeguard the duchy’s political survival and commercial interests, drew bitter denunciations from the papacy. Once again outside intervention served to foment internal factional strife. Duke Sergius II was deposed and replaced by his brother, Bishop Athanasius II, in 877. Realpolitik, however, obliged the new duke to make a new deal with the Arabs, thus earning excommunication by his former patron, Pope John VIII. Already in the ninth century Naples began to assume an important role as a centre of translation activity from Greek into Latin, although this reached its height in the tenth century. Other evidence shows that the cultural and economic influence of Byzantium was pervasive. Imports of pottery from the east were numerous, signatures to documents in Greek characters were common and a penchant for Byzantine titles such as consul (hypatos) remained strong.68 To the north, Gaeta had become increasingly important as a centre of communications after Formia was destroyed by the Arabs and its bishopric transferred to the nearby port in the eighth century. It remained nominally part of the Neapolitan duchy until 839, although in practice it often had to align itself with the papacy, whose territories surrounded it. On occasion Gaeta acted independently of Naples, as when it responded to a request from a strat¯egos of Sicily for help against Muslim raiding parties.69 From around 839 Gaeta’s greater measure of independence is reflected in the title of hypatos held by city leaders such as Docibilis I. Although its continuing ties with the Byzantine empire were reflected in the dating of documents by the regnal years of emperors and by the elite’s custom of signing their names inGreek characters, the town was forced to adopt policies favourable to theMuslims. In the 880s Aghlabid raiders were allowed to set up a pirate nest at the mouth of the nearby Garigliano river – a move which provoked bitter denunciation on the part of Pope John VIII.70 To the south was the non-Roman settlement of Amalfi, first recorded in 596 as a castrum populated by refugees from the Lombards. By the eighth century it was recorded as a naval base used in conflicts with the Lombards, Franks and Arabs, and it assumed increasing importance as a trading centre, while remaining part of the duchy of Naples, perhaps because of the continual pressure it faced from the Lombards. Although its population was temporarily transferred to Salerno after it was sacked by Prince Sicard of Benevento in 839, Amalfi soon after achieved independence fromNaples under its own leaders (comites and later praefecturii). By the late ninth century its tiny territory consisted of a small coastal strip (see fig. 41), theMonti Lattari in the hinterland and the isle of Capri, and a dynasty was established by the praefecturius Manso which lasted for seventy years (see below, p. 577). Although theGreek element was never as strong as inNaples and its foreign policy became steadily more independent of the empire, Amalfitan trading links with the east became increasingly important.