The Swedish invasion of the Polish–Lithuanian Commonwealth in the following year started the Second Northern War. Frederick William offered protection to the Royal Prussian towns in the Treaty of Rinsk, but had to yield Swedish military supremacy and withdraw to his Prussian duchy. Pursued by Swedish forces to the Prussian capital, Frederick William made peace and allied with Sweden, taking the Duchy of Prussia and Ermland (Ermeland, Warmia) as fiefs from Charles X Gustav of Sweden in the Treaty of Königsberg in January 1656. The alliance proved victorious in the Battle of Warsaw in June, enhancing the elector's international reputation. Continued pressure on Charles X Gustav resulted in him conceding full sovereignty in Ducal Prussia and Ermland to Frederick William by the Treaty of Labiau in November to ensure the maintenance of the alliance. The Treaty of Radnot, concluded in December by Sweden and her allies, further awarded Greater Poland to Brandenburg-Prussia in case of a victory.