The town was established in 1850 by Prince Mikhail Semyonovich Vorontsov, the namestnik of the Caucasus, near an ancient silver/lead mine in the nearby Alagir Gorge. It was built up as a fortified settlement around a smelting plant and became a major mining center. By the end of the 19th century, the town had been increasingly populated by Georgians and Russians who came to work there. During the Russian Civil War, in January 1919, Alagir was a scene of intense fighting, which resulted in heavy casualties in the town's Georgian population and difficult flight of the survivors through the mountainous passes into Georgia. The Soviet leader Vladimir Lenin commented on the incident, blaming "counter-revolutionaries" for atrocities in Alagir, Melnin, A.I. (1973), Октябрьская революция и гражданская война в Северной Осетии (The October Revolution and Civil War in North Ossetia), p. 225. Ordzhonikidze: Ir