The conflict was instigated by voievod Petru Rareş of Moldavia when he interfered in the succession disputes over the Hungarian throne and invaded southern Poland in support of the Ottomans. Grand Hetman Jan Tarnowski, the leader of the Polish counter-offensive, attacked and ultimately defeated Petru's forces at Gwoździec near Kolomyia, Ukraine. Tarnowski withdrew his forces northeast, but was outnumbered and besieged during the Battle of Obertyn.