In 1440 AD a Prussian Confederation (Preussischer Bund) was formed under leadership of the Hanseatic cities Elbing, Danzig and Thorn. The cities tried to obtain independence from the Teutonic Knights who, after christianizing Crusades into Prussia, had ruled the area for two hundred years.
In 1454, the Prussian Confederation asked for protection from the king of Poland, which is granted. The King of Poland became Prince of Prussia, the two states becoming a personal union under his crown. This state of affairs would continue until 1466 when Prussia was granted its own independent duke and the confederation became the Duchy of Prussia.