The borders of the empire fluctuated through several cycles of decline and recovery. During the reign of Justinian I (), the empire reached its greatest extent, after reconquering much of the historically Roman western Mediterranean coast, including North Africa, Italy and Rome, which it held for two more centuries. The Byzantine–Sasanian War of 602–628 exhausted the empire's resources, and during the Early Muslim conquests of the 7th century, it lost its richest provinces, Egypt and Syria, to the Rashidun Caliphate. During the Macedonian dynasty (10th–11th centuries), the empire expanded again and experienced the two-century long Macedonian Renaissance, which came to an end with the loss of much of Asia Minor to the Seljuk Turks after the Battle of Manzikert in 1071. This battle opened the way for the Turks to settle in Anatolia. The empire recovered during the Komnenian restoration, and by the 12th century, Constantinople was the largest and wealthiest city in Europe. The empire was delivered a mortal blow during the Fourth Crusade, when Constantinople was sacked in 1204 and the territories that the empire formerly governed were divided into competing Byzantine Greek and Latin realms. Despite the eventual recovery of Constantinople in 1261, the Byzantine Empire remained only one of several small rival states in the area for the final two centuries of its existence. Its remaining territories were progressively annexed by the Ottomans in the Byzantine–Ottoman wars over the 14th and 15th centuries. The fall of Constantinople to the Ottoman Empire in 1453 ended the Byzantine Empire. The Empire of Trebizond was conquered eight years later in the 1461 siege. The last of the successor states, the Principality of Theodoro, was conquered by the Ottomans in 1475.