The Swedes conducted a series of invasions into the Polish–Lithuanian Commonwealth, known as the Deluge. After more than half a century of almost constant warfare, the Swedish economy had deteriorated. It became the lifetime task of Charles X's son, Charles XI, to rebuild the economy and refit the army. His legacy to his son, the coming ruler of Sweden, Charles XII, was one of the finest arsenals in the world, a large standing army and a great fleet. Russia, the most serious threat to Sweden at this time, had a larger army but lagged far behind in both equipment and training.