 As a young Transylvanian nobleman, Michael Apafi accompanied Rákóczi to the Polish campaign.The new Grand Vizier of the Ottoman Empire, Köprülü Mehmed Pasha, had set about the consolidation of the empire just months before Rákóczi's Polish campaign.He instructed Rákóczi to return from his Polish campaign several times.