The area was a site of a border fort of the medieval Polish state.
During the reign of Bolesław III Wrymouth it was raised to the rank of a castellany.
During the period of feudal fragmentation of Poland it was initially part of the Duchy of Greater Poland and then subject of fighting between the Duchy and the Margraviate of Brandenburg, which took control of it after 1296.
It was sold by the Brandenburgians to the Monastic Order of the Teutonic Knights in 1317, under the authority of the knights Burkhard and Heinrich von der Osten.
However, in 1365 it became part of the Kingdom of Poland, during the rule of King Casimir III the Great, to be lost again to the Teutonic Knights in 1408.
The town was neglected by the Teutonic Knights, the castle burned down, and parts of the town walls collapsed.
In 1455, after the Thirteen Years' War broke out, the Knights sold it back to Brandenburg in order to raise funds for war against Poland.
Polish King Casimir IV Jagiellon still made peaceful efforts to regain the city, but to no avail.

In 1605 the town was transformed into a fortress, which during the Thirty Years' War was besieged by the Swedes, who captured in 1639 and held it until 1650.
In 1662 the town suffered a fire.
In 1701 it became part of Prussia.
During the Seven Years' War, from 1758 to 1762, the town was occupied by the Russians, who imposed high contributions on the inhabitants.
As a result, some of the residents escaped, some were executed, and the Russians burned some of the buildings.
A typhus epidemic also broke out.
After the war, the destroyed parts of the fortifications were dismantled and the town was repopulated by settlers from Poland, the Dutch Republic and German states.
After repopulation and the arrival of merchants from Poznań and Hamburg, the town prospered as a trade center.
In 1775 the town received a privilege from the Polish Crown, allowing the sale of foreign silk fabrics to Poland.
Other goods were also sold there, including oxen from Poland, Hungarian wine and colonial products.

During the Napoleonic Wars French troops were stationed in the town.
In 1831, several columns of Polish officers and soldiers marched through the town, fleeing the Russian Partition of Poland after the failed November Uprising.
From 1871 to 1945 the town was part of Germany.
After Poland regained independence after World War I, the Polish-German border ran nearby, leaving the town on the German side.
In the interwar period, the local economy weakened, many residents emigrated to work in western Germany.
In addition, attempts to Germanize the Polish population intensified, as a result of which some left for Poland.
Economic growth occurred in connection with the militarization of Germany by the Nazis in the 1930s, and during World War II many forced laborers, mostly Poles, were brought to the town.
After the war the town became again part of Poland, in accordance to the Potsdam Conference.
The area was a site of a border fort of the medieval Polish state. During the reign of Bolesław III Wrymouth it was raised to the rank of a castellany. During the period of feudal fragmentation of Poland it was initially part of the Duchy of Greater Poland and then subject of fighting between the Duchy and the Margraviate of Brandenburg, which took control of it after 1296. It was sold by the Brandenburgians to the Monastic Order of the Teutonic Knights in 1317, under the authority of the knights Burkhard and Heinrich von der Osten. However, in 1365 it became part of the Kingdom of Poland, during the rule of King Casimir III the Great, to be lost again to the Teutonic Knights in 1408. The town was neglected by the Teutonic Knights, the castle burned down, and parts of the town walls collapsed. In 1455, after the Thirteen Years' War broke out, the Knights sold it back to Brandenburg in order to raise funds for war against Poland. Polish King Casimir IV Jagiellon still made peaceful efforts to regain the city, but to no avail.
In 1605 the town was transformed into a fortress, which during the Thirty Years' War was besieged by the Swedes, who captured in 1639 and held it until 1650. In 1662 the town suffered a fire. In 1701 it became part of Prussia. During the Seven Years' War, from 1758 to 1762, the town was occupied by the Russians, who imposed high contributions on the inhabitants. As a result, some of the residents escaped, some were executed, and the Russians burned some of the buildings. A typhus epidemic also broke out. After the war, the destroyed parts of the fortifications were dismantled and the town was repopulated by settlers from Poland, the Dutch Republic and German states. After repopulation and the arrival of merchants from Poznań and Hamburg, the town prospered as a trade center. In 1775 the town received a privilege from the Polish Crown, allowing the sale of foreign silk fabrics to Poland. Other goods were also sold there, including oxen from Poland, Hungarian wine and colonial products.
During the Napoleonic Wars French troops were stationed in the town. In 1831, several columns of Polish officers and soldiers marched through the town, fleeing the Russian Partition of Poland after the failed November Uprising. From 1871 to 1945 the town was part of Germany. After Poland regained independence after World War I, the Polish-German border ran nearby, leaving the town on the German side. In the interwar period, the local economy weakened, many residents emigrated to work in western Germany. In addition, attempts to Germanize the Polish population intensified, as a result of which some left for Poland. Economic growth occurred in connection with the militarization of Germany by the Nazis in the 1930s, and during World War II many forced laborers, mostly Poles, were brought to the town. After the war the town became again part of Poland, in accordance to the Potsdam Conference.
Drezdenko