 Until 1668, the town was part of Poland.Afterwards it was part of Brandenburg, Prussia and Germany, until the end of World War II.It is one of the northernmost towns of the historical region of Greater Poland.