Charles Peter Ulrich, who acceded to the Russian throne as Peter III in 1762, was determined to conquer Schleswig and Holstein from Denmark-Norway. When he became tsar in 1762, he immediately signed a generous peace with Prussia and withdrew Russia from the Seven Years' War in order to concentrate fully on an attack upon Denmark. . At the same time, the Danish army had hastily moved across the border into Mecklenburg, to avoid an invasion of Holstein, and assumed battle positions. The two armies stood less than 30 kilometres apart when news from Saint Petersburg suddenly reached the Russian army that the mad tsar had been overthrown by his wife, who had now acceded to the throne as Catherine II of Russia. One of her first actions was to call off the war against Denmark and restore normal relations.