enacted new laws of succession which specifically excluded Charles Frederick and his heirs because of their Russian politics, because at that time, Russia and Sweden had a strained relationship. The exclusion of Charles Frederick and his progeny from the Swedish succession avoided the personal union of Sweden and Russia, because Charles Frederick's only child would become Tsar Peter III of Russia. The question then became who was to become the next king of Sweden after the death of the childless incumbent. The so-called "Hat faction" in Sweden managed to elect Charles Frederick's first cousin Adolph Frederick, who was his father's younger brother's son and thus belonged to the same Oldenburg dynasty, as Crown Prince of Sweden. Later life Charles Frederick left for Hamburg, as the Gottorp ducal share in the duchies of German Holstein and Danish Schleswig had been occupied by Denmark since 1713. Having lost the title as duke of Schleswig, succeeded to have the occupation of the ducal share in German Holstein removed by application to his Holstein liege lord, the Holy Roman Emperor. In 1720, Sweden and Denmark-Norway concluded the Treaty of Frederiksborg, in which Sweden pledged to cease its support of the House of [Schleswig-]Holstein-Gottorp. Duke Charles Frederick opposed the treaty, made by a Swedish government which he regarded as rebellious against his own right to the Swedish succession; the treaty also made virtually impossible the regaining of his lost ducal share in the northern duchy of Schleswig. (This was to be a motivation for his son Peter in 1762, upon his Russian accession, to start preparations for the use of Russian troops to reconquer the lost lands from Denmark-Norway.) Duke Charles Frederick was married to Anna Petrovna, Tsesarevna of Russia and elder daughter of Tsar Peter I and Marta Skavronskaya (who would later become Empress Catherine I of Russia). As Charles was the Swedish heir, Peter saw the marriage as politically useful. Charles Frederick was officially engaged to Anna by Tsar Peter. After the death of Peter in 1725, he was given a place in the council, his own court, palace and income by Catherine I of Russia and married to Anna. Anna was not enthusiastic about the marriage, because of his reputation of consorting with prostitutes. Charles Frederick, then commander of the palace guard in St. Petersburg, attempted to secure his wife's succession to the Russian throne upon the death in 1727 of her