Following the decline of the Western Roman Empire, Naples was captured by the Ostrogoths, a Germanic people, and incorporated into the Ostrogothic Kingdom.
However, Belisarius of the Byzantine Empire recaptured Naples in 536, after entering the city via the aqueduct.
As the Gothic Wars of the mid-6th century wore on, Totila briefly took the city for the Ostrogoths in 543, before, finally, the Battle of Mons Lactarius on the slopes of Vesuvius left the Byzantines in control of the area. Naples was expected to keep in contact with the Exarchate of Ravenna, which was the centre of Byzantine power on the Italian peninsula.
After the exarchate fell, a Duchy of Naples was created. Although Naples’ Greco-Roman culture endured, it eventually switched allegiance from Constantinople.
The Naples area has been inhabited since the Neolithic period. The earliest Greek settlements were established in the Naples region in the 2nd millennium BC.
Sailors from the Greek island of Rhodes established a small commercial port on the island of Megaride in the 9th century BC. In the 8th century BC, a larger settlement called Parthenope (Παρθενόπη) was founded by settlers from Cumae as part of Italy's Magna Graecia region of Greek colonisation. In the 6th century BC, after the decline of Parthenope, the new urban zone of Neápolis (Νεάπολις) was founded, eventually becoming one of the foremost cities of Magna Graecia.
The new city grew rapidly due to the influence of the powerful Greek city-state of Syracuse, and became an ally of the Roman Republic against Carthage; the strong walls surrounding Neápolis stopped the invading forces of the Carthaginian general Hannibal from entering. During the Samnite Wars, the city, now a bustling centre of trade, was captured by the Samnites; however, the Romans soon captured the city from them and made it a Roman colony.
Naples has the fourth-largest urban economy in Italy, after Milan, Rome and Turin. It is the world's 103rd-richest city by purchasing power, with an estimated 2011 GDP of US$83.6 billion. The port of Naples is one of the most important in Europe, and has the world's second-highest level of passenger flow, after the port of Hong Kong. Numerous major Italian companies, such as MSC Cruises Italy S.p.A, are headquartered in Naples. The city also hosts NATO's Allied Joint Force Command Naples, the SRM Institution for Economic Research and the OPE Company and Study Centre. Naples is a full member of the Eurocities network of European cities. The city was selected to become the headquarters of the European institution ACP/UE and as a City of Literature by UNESCO's Creative Cities Network. The Villa Rosebery, one of the three official residences of the President of Italy, is located in the city's Posillipo district.