In 1221, Genghis Khan destroyed the city in the Mongol invasion of Central Asia, in what is considered to be one of the bloodiest massacres in human history.
The area was later inhabited by the Turkmen people from the early 19th century, but they mostly developed outside the old town, utilising the latter as a graveyard.