In 1538 the city passed to the Turks. Tymofiy Khmelnytsky led the Cossacks to Chernivtsi in 1650 and 1653, and also Ivan Mazepa wintered there in 1709, in the aftermath of the defeat at Poltava. That same year, the city was sacked by the Russians and Swedes. During the Russian-Turkish wars, the city was sacked again by the Russians (1739). The Russians kidnapped a large amount of citizens as they retreated. Conflicts and invasions caused Chernivtsi to "shrink to a small settlement" by the 18th century. In 1762 the city consisted of hardly 200 wooden buildings. Its population of 1,200 was made up of boyars, merchants, loan sharks and poor people, who often revolted against injustices, having to resort to banditry (the "Opryshoks").