 Mustafa was a bureaucrat in the Ottoman Empire.He was appointed as the Kapudan Pasha (grand admiral) and then as the commander of the Polish front during the Great Turkish War.In collaboration with the Crimean khan Selim I Giray, he was able to defend Kamianets-Podilskyi, an important fort (now in Ukraine) from Polish attacks.