In the Middle Ages, Philippopolis fell to the Bulgars of the First Bulgarian Empire in 863, during the reign of Boris I (), having been briefly abandoned by the Christian inhabitants in 813 during a dispute with the "khan" Krum (). During the Byzantine–Bulgarian wars, the emperor Basil the Bulgar-Slayer () used Philippopolis as a major strategic fortification, governed by the "protospatharios" Nikephoros Xiphias. In the middle 11th century, the city was attacked by the Pechenegs, who occupied it briefly around 1090. The city continued to prosper, with the walls restored in the 12th century, during which the historian and politician Niketas Choniates was its governor and the physician Michael Italikos was its metropolitan bishop. According to the Latin historian of the Fourth Crusade, Geoffrey of Villehardouin, Philippopolis was the third largest city in the Byzantine Empire, after Constantinople (Istanbul) and Thessalonica (Thessaloniki). It suffered damage from the armies passing through the city during the Crusades as well as from sectarian violence between the Eastern Orthodox and the Armenian Orthodox and Paulician denominations. The city was destroyed by Kaloyan of Bulgaria () in 1206 and rebuilt thereafter. In 1219, the city became the capital of the Crusader Duchy of Philippopolis, part of the Latin Empire. The Second Bulgarian Empire recovered the city in 1263, but lost it to Byzantine control before recapturing it in 1323. The Ottoman Empire conquered Philippopolis () in 1363 or 1364.