In January 1656, Charles X Gustav of Sweden had made Frederick William I, Elector of Brandenburg, his vassal for the Duchy of Prussia. By the time of the treaty of Marienburg, Swedish prospect in the war had diminished, and Charles X Gustav was willing to offer Frederick William I a reward for fighting on his side. While the latter was to remain a Swedish vassal for Prussia, he was promised hereditary sovereignty in four voivodeships of Greater Poland in return for participating in the Charles X Gustav's Polish campaigns. This alliance proved victorious in the subsequent Battle of Warsaw, but as further campaigns stalled, Frederick William I was to gain full sovereignty in Prussia by the Treaty of Labiau in November 1656.