The Northern War of 1655–1660 was fought between Sweden and the Polish–Lithuanian Commonwealth, with participation at different times by Russia, Brandenburg-Prussia, the Habsburg monarchy, and Denmark–Norway. It ended with the treaties of Copenhagen and Oliva in 1660.
In 1655, Charles X took advantage of the Russo-Polish War (1654–67) to over-run western Poland. The Grand Duchy of Lithuania was annexed by Sweden, and John II Casimir Vasa took refuge in Vienna. He managed to regain parts of his kingdom in 1656, and the conflict widened when Russia declared war on Sweden, supported by Emperor Leopold and Frederick III of Denmark.