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.