In 1454, the Prussian Confederation, consisting of the gentry and burghers of western Prussia, rose up against the Order, beginning the Thirteen Years' War. Much of Prussia was devastated in the war, during the course of which the Order returned Neumark to Brandenburg in 1455. In the Second Peace of Thorn (1466), the defeated Order recognized the Polish crown's rights over western Prussia (subsequently Royal Prussia) while retaining Teutonic Eastern Prussia, but under Polish suzerainty. Because Marienburg Castle was handed over to mercenaries in lieu of their pay, the Order moved its base to Königsberg in Sambia.