The decline of the Roman Empire, from the 5th century AD onwards, and incursions by the Avars and Slavs at the end of the 6th century, prompted the Roman population to withdraw into easily defensible locations such as islands or peninsulas.