During the 1812 French invasion of Russia, Napoleon stayed in the town for 12 hours to write orders and receive an envoy from the King of Naples. The town was one of the main centers of the November Uprising (1830–1831) in Poland and Lithuania against the Russian Empire. During World War I, it was the location of the German Sventiany Offensive.