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 . In return for Hohenzollern assistance in the War of the Spanish Succession and support for the Habsburg candidate in the subsequent election , Emperor Leopold I allowed Frederick to crown himself `` King in Prussia '' , not `` King of Prussia '' ; Frederick was only an elector in his domains within the borders of the Empire , not a king ; he was only king in his former Duchy .