In 1599, Mihai Viteazul, wishing to secure his back after Sigismund Báthory's departure from the Transylvanian throne, defeated the new ruler of Transylvania, Andrew Cardinal Báthory (Andrzej Batory), who lost his life fleeing after battle, and took over Transylvania as governor on behalf of the Habsburg emperor Rudolf II. Later on, Mihai defeated Ieremia Movilă and took control over almost all of Moldavia, with the exception of Khotyn (Chocim or Hotin, a castle and a city on the right bank of the Dniestr), which remained in Polish hands. Mihai used titles of voivode of Wallachia, Transylvania, and Moldavia for the first time in May 1600. He tried to get recognition from Emperor Rudolf II, offered his vassalage to the Commonwealth, and organized an anti-Turkish league. After King Sigismund III Vasa (Zygmunt III Waza) refused, Mihai sent his troops to take over Pokucie (an area Moldavians were claiming to be theirs) but Commonwealth hetman Stanisław Żółkiewski met them with resistance.