In summer of 1655 Polish-Lithuanian Commonwealth, already engaged in bitter struggle against Muscovy and Zaporozhian Cossacks, was invaded by Swedes. It led to conflict called Second Northern War but in Commonwealth better known as 'The Deluge'. After initial series of the lost battles, country was on the brink of total defeat, with Polish troops switching sides and King Jan II Kazimierz leaving the country. Gradually though, resistance against Swedish soldiers started to grow, with local partisans raising to fight in different regions of the country. Jan II Kazimierz returned to Poland and regular Polish troops abandoned Swedish side in waves. More countries joined the conflict, with Brandenburg initially allying with Sweden but then changing side again. Transylvania and Cossacks supporting Swedes, while Imperial and Tatars troops joined the Poles. Another front of war opened in 1658, with Denmark attacking Swedes as well. It was period of near constant war, usually on two or even