Since the main Polish forces of the Polish–Lithuanian Commonwealth were engaged in fighting the Swedish Empire, only a division of Stanisław Potocki was sent southwards.
In June of the same year, Swedish forces abandoned Rakoczi, and headed to Denmark, due to the outbreak of the Dano-Swedish War.
On July 16, Czarniecki's division joined the forces of Lubomirski and Potocki, and the hetmans decided to destroy Rakoczi.
Lubomirski and Potocki were willing to sign a treaty, while Czarniecki and his soldiers wanted to fight, hoping for rich booty.
The hetmans were more inclined to an agreement, but Czarniecki and his soldiers were aiming for a decisive battle, counting on the destruction of the enemy and considerable spoils.
Rakoczi was obliged to break the alliance with the Swedish Empire, pull his garrisons out of the occupied cities of Kraków and Brest, and pay 1.2 million Polish złotys to the Polish-Lithuanian Treasury.