Battle of Jena–Auerstedt
Prussia had acquired the City of Danzig in the course of the Second Partition of Poland in 1793. After the defeat of King Frederick William III of Prussia at the 1806 Battle of Jena–Auerstedt, according to the Franco-Prussian Treaty of Tilsit of 9 July 1807, the territory of the free state was carved out from lands that made up part of the West Prussia province. It consisted of the city of Danzig (now Gdańsk, Poland) along with its rural surroundings on the mouth of Vistula including Oliva, together with the Hel Peninsula and its lighthouse as well as the southern half of the Vistula Spit up to Narmeln.