 This prevented a takeover of all of Prussia, but in the Second Peace of Thorn in 1466, the Knights had to surrender the western half of their territory to the Polish Crown (the areas known afterwards as Royal Prussia, a semi-autonomous entity), and to accept Polish-Lithuanian suzerainty over the remainder (the later Ducal Prussia).Poland regained Pomerelia, with its access to the Baltic Sea, as well as Warmia.In addition to land warfare, naval battles took place in which ships provided by the City of Danzig (Gdańsk) successfully fought Danish and Teutonic fleets.