Frederick II (Friedrich II.; 24 January 1712 - 17 August 1786) was King in Prussia from 1740 until 1772, and King of Prussia from 1772 until his death in 1786. His most significant accomplishments include his military successes in the Silesian wars, his reorganisation of the Prussian Army, the First Partition of Poland, and his patronage of the arts and the Enlightenment. Frederick was the last Hohenzollern monarch titled King in Prussia, declaring himself King of Prussia after annexing Royal Prussia from the Polish–Lithuanian Commonwealth in 1772. Prussia greatly increased its territories and became a major military power in Europe under his rule. He became known as Frederick the Great (Friedrich der Große) and was nicknamed "Old Fritz" ("Der Alte Fritz").
In his youth, Frederick was more interested in music and philosophy than in the art of war, which led to clashes with his authoritarian father, Frederick William I of Prussia. However, upon ascending to the Prussian throne, he attacked and annexed the rich Austrian province of Silesia in 1742, winning military acclaim for himself and Prussia. He became an influential military theorist whose analyses emerged from his extensive personal battlefield experience and covered issues of strategy, tactics, mobility and logistics.
Frederick was a supporter of enlightened absolutism, stating that the ruler should be the first servant of the state. He modernised the Prussian bureaucracy and civil service, and pursued religious policies throughout his realm that ranged from tolerance to segregation. He reformed the judicial system and made it possible for men of lower status to become judges and senior bureaucrats. Frederick also encouraged immigrants of various nationalities and faiths to come to Prussia, although he enacted oppressive measures against Catholics in Silesia and Polish Prussia. He supported the arts and philosophers he favoured, and allowed freedom of the press and literature. Frederick was almost certainly homosexual, and his sexuality has been the subject of much study.