It is known since the first half of the XVI century as a Cossacks winter camp. It got a status of a town in the XVIII century. In 1757 a big earthen fortification was built. It was surrounded by a ravine and water. It had a form of a hexagon. Later it had been represented on an emblem.