General immigration of German settlers diminished, however, when Poland, under King Casimir IV Jagiellon (1447–1492), finally defeated the Teutonic Order in 1466.
Thus, in the 14th century Piła grew to some extent because of its position on the Gwda a mere 11 kilometres (7 miles) from where it joins the river Notec.
Piła's simple layout of unpaved streets and primitive clay and timber houses gave little protection to its inhabitants and was still far from becoming a commercially interesting locale.
Documented references to Snydemole and Piła are reportedly found in parish church sources of 1449, where there is mention of a sawmill and of the name of the current wojewoda (governor) Paul.
Evidence also exists of a letter from 1456 by the Brandenburg Friedrich II Hohenzollern who had bought the Neumark region from the Teutonic Order in 1455.
This accusation may tend to give additional credence to the earlier claim that Queen Jadwiga in the 1380s was indeed the founder of the town of Piła.
However, King Sigismund I the Old—during whose reign immigration of numerous Jews from the Iberian peninsula, Bohemia and German states was encouraged—bestowed municipal rights upon the town of Piła on 4 March 1513, a landmark decision.
This family, secretly leaning toward Protestantism and in power until the 17th century, included some of the wealthiest landowners and most influential nobles of Poland and was known to be benevolent to their town's folk.
By the middle of the 16th century, many German Protestant craftsmen and traders, driven out of Bohemia by religious persecution during the Reformation, settled in numerous towns in the region.
When King Stephen Báthory of Poland confirmed two of the town's privileges on 3 September 1576, the burghers were granted the right to hold their weekly market on a Monday (instead of Thursday),[4] an important feat.
[4] When the widowed Sigismund III Vasa married princess Constance, an Austrian archduchess from the House of Habsburg, in 1605, he presented the town of Piła, together with the lands of the domain of Ujście, as a wedding gift to his new bride.
After one of the town's frequent fires in 1619, the queen—in a benevolent gesture and as her 'present' to the burghers of Piła—appropriated funds from the large estate to have the old burnt-out wooden Catholic Church rebuilt.
To demarcate the newly created ghetto, the decree called for a sizable trench to be dug to surround the Jewish quarters where feasible; otherwise a tall wooden fence had to serve to close in the area completely.
During October 1656, a Polish troupe of Stefan Czarniecki's army sought retribution upon the largely German and Protestant burghers of Piła, accusing them of collusion with the Swedes.
After Frederick II of Prussia signed the Ownership Protocol of his Polish lands on 13 September 1772, he created out of the northern parts of Greater Poland and Kuyavia the Département Westpreussen.
Part of that area was later also known as the Netzedistrikt, a governmental administrative district consisting of a wide strip of land both sides of the river Noteć (Netze), stretching from it source north of Września (Wreschen) to the border of the Neumark.
Although Prussian authorities had brought in chimney sweeps and regulations that spelled out fire emergency tasks, hardly anyone in the town was prepared for a major conflagration.
Following Prussia's defeat in the battle of Jena and Greater Poland uprising (1806), and after signing the Peace of Tilsit of 7 July 1807, Piła became part of the semi-independent Polish Duchy of Warsaw.
One of the main escape routes for insurgents of the unsuccessful Polish November Uprising from partitioned Poland to the Great Emigration led through the city.
The drilling of an artesian well in August 1892 went horribly wrong and led to unexpected widespread flooding of many of the streets laid out in 1834, causing numerous houses to simply collapse and leaving more than eighty families without shelter.
The worst was that this disaster came only a few years on the heels of unexpected flooding caused by the spring thaw of March 1888 that had turned the Küddow into a raging river, when many people were forced to use rowboats to navigate the streets.
A telling account of life in the town during that period survives in the form of the diary of Piete Kuhr, then a young girl whose grandmother worked at the Red Cross canteen at the railway station.
In 1925, with the sudden influx of the Optanten, inhabitants of areas annexed by Poland who opted not to become Polish citizens and left for the reduced German Reich.
[citation needed] In March and September 1938, a Verwaltungsgliederung, or administrative reform, merged the three territorially unconnected parts of the Frontier March of Posen-West Prussia province into the respective neighbouring Prussian provinces of Brandenburg, Silesia and Pomerania — placing the bulk of former Posen-West Prussia with the districts of Deutsch Krone, Flatow, Netzekreis, Schlochau and Schneidemühl into Pomerania.
During the East Pomeranian offensive it was captured by the joint Polish and Red Army forces after two weeks of heavy fighting on 14 February 1945.
As a result of the border changes agreed at the Potsdam Conference in 1945, the city became again part of Poland, although with a Soviet-installed communist regime, which stayed in power until the Fall of Communism in the 1980s.
In August 1980, employees of local factories joined the nationwide anti-communist strikes,[19] which led to the foundation of the Solidarity organization, which played a central role in the end of communist rule in Poland.