In return for support in the War of the Spanish Succession Emperor Leopold I allowed Frederick to call himself King in Prussia. The Duchy of Prussia was outside the Empire, and he was only regarded as King outside the Empire.