of Ankara in 1402, the weakened Ottomans were forced to return the eastern coasts of Thessaly and the region of Zetounion to Byzantine rule. In 1423, however, the renewed Ottoman pressure forced the local Byzantine commander to surrender the forts of Stylida and Avlaki to the Venetians. By 1444, however, the entire region had been finally conquered by the Turks. Pteleos alone remained in Venetian hands until 1470. The newly conquered region was initially the patrimonial domain of the powerful marcher-lord Turahan Bey (died 1456) and of his son Ömer Bey (died 1484) rather than a regular province. Turahan and his heirs brought in settlers from Anatolia (the so-called "Konyalis" or "Koniarides" since most were from the region around Konya) to repopulate the sparsely inhabited area, and soon, Muslim settlers or converts dominated the lowlands, while the Christians held the mountains around the Thessalian plain. The area was generally peaceful, but banditry was endemic, and led to the creation of the first state-sanctioned Christian autonomies known as armatoliks, the earliest and most notable of which was that of Agrafa. Failed Greek uprisings occurred in 1600/1 and 1612, and during the Morean War and the Orlov Revolt. After 1780, the ambitious Ali Pasha of Ioannina took over control of Thessaly, and consolidated his rule after 1808, when he suppressed a local uprising. His heavy taxation, however, ruined the province's commerce, and coupled with the outbreak of the plague in 1813, reduced the population to some 200,000 by 1820. When the Greek War of Independence broke out in 1821, Greek risings occurred in the Pelion and Olympus mountains as well as the western mountains around Fanari, but they were swiftly suppressed by the Ottoman armies under Mehmed Reshid Pasha and Mahmud Dramali Pasha. After the establishment of the independent Kingdom of Greece, Greek nationalist agitation continued, with further revolts in 1841, 1854 and again during the Russo-Turkish War of 1877–1878. Thessaly remained in Ottoman hands until 1881, when it was handed over to Greece under the terms of the Convention of Constantinople. Modern era After union with Greece, Thessaly became divided into four prefectures: Larissa Prefecture, Magnesia Prefecture, Karditsa Prefecture, and Trikala Prefecture. In 1897, the region was overrun by the Ottomans during the brief Greco-Turkish War of 1897. The Ottoman army withdrew after the war's end, but minor territorial adjustments were made to the frontier in the Ottomans' favour. The early