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. The city remained the capital of the Empire until its dissolution in 476, when it became the capital of Odoacer, and then of the Ostrogoths under Theodoric the Great. 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. After this reconquest it became the seat of the provincial governor.