Frederick II (; 24 January 171217 August 1786) was a Prussian king and military leader who ruled the Kingdom of Prussia from 1740 until 1786, at 46 years the longest reign of any Hohenzollern king. His most significant accomplishments during his reign included his reorganization of Prussian armies, his military successes in the Silesian wars and the Partitions of Poland, and his patronage of the arts and the Enlightenment. Frederick was the last Hohenzollern monarch titled King in Prussia and declared himself King of Prussia after annexing strategic parts of the Polish–Lithuanian Commonwealth in 1772. Prussia greatly increased its territories and became a leading military power in Europe under his rule. He became known as Frederick the Great () and was nicknamed "The Old Fritz" () by the Prussian people and eventually the rest of Germany.