In 1657, he invaded the Polish–Lithuanian Commonwealth in the third part of the Second Northern War (1655–1660), also known as the Deluge.