 After the Napoleonic Wars, the town was within the Grand Duchy of Posen and later the Province of Posen.It became part of the German Empire in 1871.In 1918 it became part of the Second Polish Republic.