King in Prussia (German: König in Preußen) was a title used by the Prussian kings (also in personal union Electors of Brandenburg) from 1701 to 1772. Subsequently, they used the title King of Prussia (König von Preußen).
The House of Hohenzollern ruled Brandenburg as Prince-Electors, and were subjects of the Holy Roman Emperor. Since 1618, the Electors of Brandenburg had also ruled the Duchy of Prussia, which lay outside the empire, in a personal union. The dual state was known unofficially as Brandenburg-Prussia. Originally the dukes of Prussia held the fief as vassals of the King of Poland, until the Treaties of Labiau (1656) and Bromberg (1657), with which Frederick William, the Great Elector, achieved full sovereignty from the Polish Crown. In 1701 Elector Frederick III wanted to show his greatness by adopting the title king.
In the Crown Treaty of 16 November 1700, 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". Only two royal titles were permitted within the borders of the Holy Roman Empire-King of the Romans (held by the Holy Roman Emperor or their heir apparent) and King of Bohemia (held more or less continuously since the 16th century by the Holy Roman Emperors in a de facto personal union). However, Prussia lay outside the empire, and the Hohenzollerns were fully sovereign over it. Frederick thus argued that German law of the time allowed him to rule Prussia as a kingdom.
The title "King in Prussia" reflected the legal fiction that Frederick was only sovereign over his former duchy. In Brandenburg and the other Hohenzollern domains within the borders of the empire, he was legally still an elector under the ultimate overlordship of the emperor. By this time, however, the emperor's authority had become purely nominal. The rulers of the empire's member states acted largely as the rulers of sovereign states, and only acknowledged the emperor's suzerainty in a formal way. Hence, even though Brandenburg was still legally part of the empire and ruled in personal union with Prussia, the two states came to be treated as one de facto. Although Prussia's royal title gave the Hohenzollern rulers higher status, Brandenburg was the wealthier and more populous portion of the combined realm, and Brandenburg's capital Berlin remained the primary residence of the King and his administration.
On 17 January 1701, Frederick dedicated the royal coat of arms, the Prussian black eagle with the motto "suum cuique" imprinted. On 18 January, he crowned himself and his wife Sophie Charlotte in a baroque ceremony in Königsberg Castle.
Frederick's move was controversial, and only became widely accepted after the Treaty of Utrecht in 1713. The title "King of Prussia" implied lordship over the entire Prussian region, not simply the former Duchy of Prussia, now the Kingdom of Prussia. The assumption of such a title by the Hohenzollern margraves threatened neighboring Poland; because the province of Royal Prussia was part of the Kingdom of Poland, the Kings of Poland also titled themselves Kings of Prussia until 1742.
Throughout the 18th century, the Hohenzollerns increased their power. They were victorious over the Austrian Habsburg monarchy in the three Silesian Wars, greatly increasing their power through the acquisition of Silesia. King Frederick II adopted the title King of Prussia in 1772, the same year he annexed most of Royal Prussia in the First Partition of Poland.
The Hohenzollerns continued to be both Kings of Prussia and Electors of Brandenburg until the empire's dissolution in 1806. At that point, the entire realm was formally unified as the Kingdom of Prussia, with Brandenburg one of its provinces and Berlin the kingdom's capital.