The Treaty of Bromberg (, Latin: Pacta Bydgostensia) or Treaty of Bydgoszcz was a treaty between John II Casimir of Poland and Elector Frederick William of Brandenburg-Prussia that was ratified at Bromberg (Bydgoszcz) on 6 November 1657. The treaty had several agreements, including the Treaty of Wehlau, signed on 19 September 1657 by the Brandenburg–Prussian and Polish–Lithuanian envoys in Wehlau (Welawa, now Znamensk). Thus, the Treaty of Bromberg is sometimes referred to as treaty of Wehlau-Bromberg or Treaty of Wehlau and Bromberg (). In exchange for military aid in the Second Northern War and the return of Ermland (Ermeland, Warmia) to Poland, the Polish king granted the Hohenzollern dynasty of Brandenburg hereditary sovereignty in the Duchy of Prussia, pawned Draheim (Drahim) and Elbing (Elbląg) to Brandenburg and handed over Lauenburg and Bütow Land to the Hohenzollerns as a hereditary fief. The treaty was confirmed and internationally recognized in the Peace of Oliva in 1660. Elbing was kept by Poland, but Lauenburg and Bütow Land and Draheim were later integrated into Brandenburg-Prussia. The sovereignty in Prussia constituted the basis for the later coronation of the Hohenzollern as Prussian kings. Wehlau-Bromberg remained in effect until it was superseded by the Treaty of Warsaw (18 September 1773) after the First Partition of Poland. The Treaty of Bromberg later became regarded as one of the worst mistakes in Polish foreign policy towards Prussia after its consequences had become fatal to Poland. Context The Duchy of Prussia was established as a Polish fief under duke Albrecht (Albert) in the Treaty of Cracow of 8 April 1525. The fief was hereditary, and if Albrecht or his brothers' house became extinct in the male line, the fief was to pass to the Polish king, who was to appoint a German-speaking Prussian-born governor. On 4 June 1563, that provision was changed by Polish King Sigismund II Augustus in a privilege issued at Petrikau, which, in addition to Albrecht's branch of the House of Hohenzollern (Hohenzollern-Ansbach), allowed the Brandenburg branch of the Hohenzollern as possible successors. The privilege provided for the succession of the Brandenburgian electors as Prussian dukes upon the extinction of the House of Hohenzollern-Ansbach in 1618. In 1656, during the early Second Northern War, the Brandenburgian Hohenzollern took the Prussian duchy and Ermland (Ermeland, Warmia) as Swedish fiefs in the Treaty of Königsberg, before the Swedish king released them from the vassalage and made them absolute