Founded by the Cumans in the 8th century BC , it was among the most important cities of Magna Graecia  and played a notable commercial, cultural and religious role towards the surrounding Italic populations. After the collapse of the Roman Empire, in the 8th century the city formed an autonomous duchy independent of the Byzantine Empire; later, from the thirteenth century and for more than five hundred years, it was the capital of the Kingdom of Naples; with the restoration it became the capital of the Kingdom of the Two Sicilies under the Borbons until the Unification of Italy.