<human>:  What is the history of the Kingdom of Prussia?
<bot>: The Kingdom of Prussia was a German kingdom that existed from 1701 to 1918 and was the predecessor of the German Empire. Founded by the Great Elector, later King Frederick I, the Kingdom of Prussia was established as a result of the Second Peace of Thorn and the Treaty of Lublin. It was initially a duchy, but in 1701 it became a kingdom within the Holy Roman Empire. In 1772, Prussia annexed the province of West Prussia and, in 1815, it also annexed part of the Duchy of Warsaw. By the 19th century, the Kingdom of Prussia had become one of the most prominent states in Europe and it surpassed the Austrian Empire in prestige and influence. The Kingdom of Prussia reached its greatest height under King Frederick II, who was also known as Frederick the Great. His victory in the Seven Years' War enabled Prussia to become the dominant power in German-speaking Europe. After the unification of Germany in 1871, Prussia remained the dominant political power in the new German Empire until the end of World War I when it was abolished and replaced by the Weimar Republic.