Between 830 and 840, the towns of the coast between Lettere and Tramonti and Cetara and Positano, including the island of Capri, united to form a confederation of states later known as the Duchy of Amalfi. Each city retained its own name and administrative autonomy, but had a specific role in this federation.[3] Maiori was the seat of the duchy's admiralty, the customs, the salt market and several arsenals.