In 1655, Minsk was conquered by troops of Tsar Alexei of Russia. Russians governed the city until 1660 when it was regained by John II Casimir, Grand Duke of Lithuania and King of Poland. By the end of the Polish-Russian War, Minsk had only about 2,000 residents and just 300 houses. The second wave of devastation occurred during the Great Northern War, when Minsk was occupied in 1708 and 1709 by the army of Charles XII of Sweden and then by the army of Peter the Great. The last decades of the Polish rule involved decline or very slow development, since Minsk had become a small provincial town of little economic or military significance.