In accordance with Treaty of Radnot, in January 1657, the Transylvanian army of 25,000 crossed the Carpathians, joined with Zaporozhian Cossacks and set off towards Kraków, where the situation of the Swedish garrison was desperate.
Along the way to the ancient Polish capital, the Transylvanian-Cossack army burned and looted towns and villages, murdering thousands.
Since his army was too busy looting Lesser Poland, only 5,000 soldiers reached Kraków, which by the Treaty of Radnot, was to be ruled by Transylvania.
On May 13, Rákóczi and Charles X Gustav seized the fortress of Brześć Litewski, and on May 17, after a three-day siege, the Swedes, Cossacks, and Transylvanians captured Warsaw.
Three days later, Rákóczi signed a peace treaty with the Commonwealth, in which he promised to break the alliance with Sweden, withdraw his troops from Poland, and pay for the damage inflicted by his army.