During the Thirteen Years' War ("War of the Cities"), in February 1454, the Prussian Confederation, led by the cities of Danzig (Gdańsk), Elbing (Elbląg), and Thorn (Toruń), as well as gentry from Kulmerland (Chełmno Land) asked the Polish king for support against the Teutonic Order's rule and for incorporation of Prussia into the Polish kingdom. The rebellion also included major cities from the eastern part of the Order's lands, such as Kneiphof, a part of Königsberg. The war ended in October 1466 with the Second Peace of Thorn, which provided for the Order's cession to the Polish Crown of its rights over the western half of Prussia, including Pomerelia and the districts of Elbing, Marienburg (Malbork), and Kulm (Chełmno).
Royal Prussia enjoyed substantial autonomy in its affiliation to the Crown of Poland - it had its own Diet (see Prussian estates), treasury and monetary unit and armies. It was governed by a council, subordinate to the Polish king, whose members were chosen from local lords and wealthy citizens. Prussians had also seats provided for them in Polish Diet, but they chose not to use this right until the Union of Lublin.
The Bishopric of Warmia had claimed the title of imperial Prince-Bishopric status, supposedly given by Emperor Charles IV. Although this claim seems unsupported by any document, it was in wide use in the 17th century. The bishopric continued defending this status until the end of the Holy Roman Empire in 1806.
The eastern part of Prussia remained under the rule of the Order and its successors, becoming the Duchy of Prussia in 1525 when the Order's Grand Master Albert of Brandenburg adopted Lutheranism and secularized the land as its hereditary ruler. In 1618 the duchy was inherited by John Sigismund, Elector of Brandenburg. It remained under Polish (and briefly Swedish) suzerainty and the rulers of Brandenburg had to swear formal allegiance to the Polish Crown. Brandenburg achieved sovereignty over the duchy in the Treaty of Wehlau (1657).
The main task of the Sejmiks was the election of MPs for the Sejm of Poland. Royal Prussia was allocated 10 MPs (167 total).