It was founded in 1593 as a fortress, a part of the southern fortification line around Moscow. In the 17th century, the town was sacked by Crimean Tatars. Later it was affected by the Russian Civil War in 1919, as well as by World War II, where it was captured by Hungarian troops. After World War II, industry developed in the city and its population started to grow.