From the 4th century, the Empire's Balkan territories, including Greece, suffered from the dislocation of the Barbarian Invasions. The raids and devastation of the Goths and Huns in the 4th and 5th centuries and the Slavic invasion of Greece in the 7th century resulted in a dramatic collapse in imperial authority in the Greek peninsula. Following the Slavic invasion, the imperial government retained formal control of only the islands and coastal areas, particularly the densely populated walled cities such as Athens, Corinth and Thessalonica, while some mountainous areas in the interior held out on their own and continued to recognize imperial authority. Outside of these areas, a limited amount of Slavic settlement is generally thought to have occurred, although on a much smaller scale than previously thought.