Upon completion of his studies in 1617, Khmelnytsky entered into service with the Cossacks. As early as 1619, he was sent together with his father to Moldavia, when the Polish–Lithuanian Commonwealth entered into war against the Ottoman Empire. His first military engagement was a tragic one. During the battle of Cecora (Țuțora) on 17 September 1620, his father was killed, and young Khmelnytsky, among many others including future hetman Stanisław Koniecpolski, was captured by the Turks. He spent the next two years in captivity in Constantinople as a prisoner of an Ottoman Kapudan Pasha (presumably Parlak Mustafa Pasha). Other sources claim that he spent his slavery in Ottoman Navy on galleys as an oarsman, where he picked up a knowledge of Turkic languages.