Neither of those. You are both right about the town giving the name to the empire of which it was the capital (I have to admit that I didn't really think about for how many towns and empires this applies). Neither empire fell through invaders from the west though, so you should look a bit further to the east. Also note that the name relation between empire and capital is not as close in this case as it is in case of Rome or Byzanz. The empire I'm talking of had it's climax before both, Byzanz and Rome.