During the 18th Century, the Electorate of Saxony was a rich state of the Holy Roman Empire. Northern Saxony was one of most fertile parts of Germany, though fertility diminishes toward Ore Mountains of the south where Saxony long had important mineral production. The House of Wettin ruled Saxony since 1429. Between 1697 and 1763, the Electors of Saxony were also elected Kings of Poland. The Elector Frederick August I (12 May 1670-1 February 1733), also known as "Sun King" of Saxony, was elected King of Poland with the support of Austria and the help of Russia when the former King Stanislaw I Leszczynski, supported by France, was forced to flee after the Swedish defeat of Poltava in 1709. The Elector married Maria Josepha, sister of the Emperor Charles VI of Austria. The Emperor, having no male heirs was obsessed with the partition of the vast Imperial territories after his death. He issued on 19 April, 1713, an edict to ensure that the Habsburg hereditary possession could be inherited by a daughter, the Pragmatic Sanction. Frederick August I recognized the edict. When Frederick August died in 1733, Leszczynski, the archenemy of the House of Wettin, with the support of France and Spain, contested the election of Frederick August II of Saxony as King of Poland. This led to the War of the Polish Succession.