"Russo-Polish War (1654–1667):" Anticipating that the Treaty of Pereyaslavl would mean war with Poland, Russia struck first, taking Smolensk. In 1665 Sweden attacked Poland leading to the near-collapse of the Commonwealth (the so-called 'Deluge'). Instead of finishing off Poland, Russia and Sweden fell out (Russo-Swedish War (1656–1658)), giving the Commonwealth time to recover. By the Treaty of Andrusovo in 1667, Russia acquired Smolensk and Chernihiv and nominal rule over the lands east of the Dnieper, including Kyiv. To the south of this, Zaporizhia was in theory a Russo-Polish condominium, but in practice continued under Cossack self-government. By the Eternal Peace Treaty of 1686 Poland gave up its claim to Zaporizhia.