Because the duchy was outside of the core Holy Roman Empire, the prince-electors of Brandenburg were able to proclaim themselves King of Prussia beginning in 1701. After the annexation of most of western Royal Prussia in the First Partition of the Polish-Lithuanian Commonwealth in 1772, eastern (ducal) Prussia was connected by land with the rest of the Prussian state and was reorganized as a province the following year (1773). Between 1829 and 1878, the Province of East Prussia was joined with West Prussia to form the Province of Prussia.

Why were the prince electors able to proclaim themselves King of Prussia?