Starting in 1645, the Ottoman Empire gradually took Crete from the Republic of Venice, which had ruled it since 1204. In the final major defeat, Candia (modern Iraklion) fell to the Ottomans in 1669 (though some offshore islands remained Venetian until 1715). Crete remained part of the Ottoman Empire until 1897.