Frederick II came to power as the what?

Frederick II came to power as the King of Prussia. Parts of his kingdom were technically part of the Holy Roman Empire.