The Catalans held the city from 1318 until 1391, when it passed to the Acciaioli Dukes of Athens. The fortress was razed by the Ottoman Sultan Bayezid I in 1394. After the disastrous Battle of Ankara in 1402, the weakened Ottomans were forced to return some territories, including the region of Zetounion, to Byzantine rule. The Turks besieged the city for two years sometime before 1415, but the Byzantines resisted successfully. Sometime between 1424 and July 1426, however, the city had been once more conquered by the Turks. Apart from an attack by the troops of the Despotate of the Morea in 1444, which plundered the city, from then on the town remained under firm Ottoman control until it became part of the newly independent Kingdom of Greece in 1832. Until the annexation of Thessaly in 1881, it was a border city (the borders were drawn at a site known as "Taratsa" just north of Lamia).