[2] The treaty concluded the Thirteen Years' War which had begun in February 1454 with the revolt of the Prussian Confederation, led by the cities of Danzig (Gdańsk), Elbing (Elbląg), Kulm (Chełmno) and Toruń, and the Prussian gentry against the rule of the Teutonic Knights in the Monastic State, in order to join the Kingdom of Poland.
The peace talks were held in Nieszawa (present-day Mała Nieszawka) from 23 September 1466,[3] and in the final stages moved to Toruń.
Later, some disagreements arose concerning certain prerogatives that Royal Prussia and the cities held, like Danzig's privileges.
The region possessed certain privileges such as the minting of its own coins, its own Diet meetings (see the Prussian estates), its own military, and its own administrative usage of the German language for minority.
Eventually, Royal Prussia became integrated into the Polish–Lithuanian Commonwealth, but retained some distinctive features until the partitions of Poland in the late 18th century.