Most of the era of the Sasanian Empire was overshadowed by the Roman–Persian Wars, which raged on the western borders at Anatolia, the Western Caucasus, Mesopotamia, and the Levant, for over 700 years. These wars ultimately exhausted both the Romans and the Sasanians and led to the defeat of both by the Muslim invasion.