Title: Amalfi
Content:  Amalfi is a town and comune in the province of Salerno, in the region of Campania, Italy, on the Gulf of Salerno. It lies at the mouth of a deep ravine, at the foot of Monte Cerreto (1,315 metres, 4,314 feet), surrounded by dramatic cliffs and coastal scenery. The town of Amalfi was the capital of the maritime republic known as the Duchy of Amalfi, an important trading power in the Mediterranean between 839 and around 1200. In the 1920s and 1930s, Amalfi was a popular holiday destination for the British upper class and aristocracy. Amalfi is the main town of the coast on which it is located, named Costiera Amalfitana (Amalfi Coast), and is today an important tourist destination together with other towns on the same coast, such as Positano, Ravello and others. Amalfi is included in the UNESCO World Heritage Sites. A patron saint of Amalfi is Saint Andrew, the Apostle, whose relics are kept here at Amalfi Cathedral (Cattedrale di Sant'Andrea/Duomo di Amalfi).
Title: Duchy of Amalfi
Content:  The Duchy of Amalfi (Ducato di Amalfi, Ducatus Amalphitanus) or the Republic of Amalfi (Repubblica di Amalfi) was a de facto independent state centered on the Southern Italian city of Amalfi during the 10th and 11th centuries. The city and its territory were originally part of the larger ducatus Neapolitanus, governed by a patrician, but it extracted itself from Byzantine vassalage and first elected a duke (or doge) in 958. During the 10th and 11th centuries Amalfi was estimated to have a population of 50,000–70,000 people. It rose to become an economic powerhouse, a commercial center whose merchants dominated Mediterranean and Italian trade in IX and X century, before being surpassed and superseded by the other maritime republics of the North, like Pisa, Venice, and Genoa. In 1073, Amalfi lost its independence, falling to Norman invasion and subsequently to Pisa in 1137.
Title: Amalfi Coast
Content:  During the 10th–11th centuries, the Duchy of Amalfi existed on the territory of the Amalfi Coast, centered in the town of Amalfi. The Amalfi coast was later controlled by the Principality of Salerno until Amalfi was sacked by the Republic of Pisa in 1137.
Title: Duchy of Amalfi
Content:  Ibn Hawqal, writing in 977 during the great reign of Manso I, described Amalfi as: ''. . . la più prospera città di Longobardia, la più nobile, la più illustre per le sue condizioni, la più agiata ed opulenta. Il territorio di Amalfi confina con quello di Napoli; la quale è bella città, ma meno importante di Amalfi. . . . the most prosperous Lombard city, the most noble, the most illustrious for its conditions, the most wealthy and opulent. The territory of Amalfi borders that of Naples; a beautiful city, but less important than Amalfi. The title "Duke of Amalfi" was revived in the later 14th century as a title used within the Kingdom of Naples.
Title: Duchy of Amalfi
Content:  981 to 983, Amalfi ruled the Principality of Salerno. In 987, the Amalfitan bishopric was raised to archiepiscopal status. From 1034, Amalfi came under the control of the Principality of Capua and, in 1039, that of Salerno. In 1073, Robert Guiscard conquered the city and took the title dux Amalfitanorum: "duke of the Amalfitans." In 1096, Amalfi revolted, but this was put down in 1101. It revolted again in 1130 and was finally subdued in 1131, when the Emir John marched on Amalfi by land and George of Antioch blockaded the town by sea and set up a base on Capri. In 1135 and 1137, Pisa sacked the city and the glory of Amalfi was past. The Arab 
Title: Duke of Amalfi
Content:  Medieval Amalfi was ruled, in the tenth and eleventh centuries, by a series of dukes (duces), sometimes called dogi (singular: doge), corresponding with the republic of Venice, a maritime rival throughout the Middle Ages. Before the title of Duke of Amalfi was formally established in 957, various patricians governed the territory. Amalfi established itself as one of the earliest maritime trading powers renowned throughout the Mediterranean, considered for two centuries, one of the most powerful of the maritime republics. The title of Duke of Amalfi was reestablished as a Spanish ducal title in 1642 by King Philip IV of Spain for Prince Ottavio Piccolomini, a Field Marshal of the Holy Roman Imperial Army. Of noble Tuscan descent, two Popes were scions of the Piccolomini family, and the first duke's younger brother, Dom Ascanio, served as Archbishop of Siena from 1628 until 1671. King Alfonso XIII of Spain revived the dukedom in 1902, and the title is extant.
Title: Duchy of Amalfi
Content:  The city of Amalfi was founded as a trading post in 339. Its first bishop was appointed in 596. In 838, the city was captured by Sicard of Benevento with help from traitors within the city, who led him in through the waterward defenses. Many of the Amalfitans in Salerno sacked that city and left. In 839, Amalfi freed itself from Lombard domination and elected a prefect. Nearby Atrani participated in these early prefectural elections. Subsequently, Amalfi helped to free Siconulf to oppose the ruling Prince of Benevento. In 897, the self-governing republic, still nominally tied to the Byzantine Empire, was defeated in a war with Sorrento, supported by Naples, in which her prefect was captured, later ransomed. 
Title: Amalfi
Content:  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 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 
Title: Amalfi
Content:  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 1073, 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 the Republic of Venice. In spite of some devastating setbacks it had a population of some 70,000 to 80,000 reaching a 
Title: Duchy of Amalfi
Content:  While the Duchy of Amalfi never regained its independence after 1137, the city of Amalfi was still important to maritime trade for the next 200 years, until 1343, when an earthquake and a storm destroyed most of its harbor. The most important contribution Amalfi made during those 200 years was probably the perfection of the modern-day box compass. Between 1295 and 1302, Flavio Gioia turned the compass from a needle floating in water to what we use today, a round box with a compass card that rotates 360 degrees attached to a magnetic element.

Question: What is the capital of Duchy of Amalfi?
Answer: Amalfi.