Ravenna became the capital of the Western Roman Empire in 402 under Honorius, due to its fine harbour with access to the Adriatic and its ideal defensive location amidst impassable marshes.
It remained the capital of the Ostrogothic Kingdom, but in 540 during the Gothic War (535-554), Ravenna was occupied by the East Roman (known today as Byzantine) general Belisarius.