It had become highly prosperous due to its strategic location on the main trade routes from the south to the north, and the west to the east, vastly contributing to the development of science and culture in Central Asia. According to an 1893 writer Djordjania or Jorjania was the "second capital" of the country. It was on the Wadak canal which seems to be the east end of the Kunya-Darya which seems to be the river bed that now leads to the Sarykamysh Lake. Just east of the town was a dam that irrigated the area and blocked the flow of the Oxus into the Caspian Sea. In 1220 both town and dam were destroyed by the Mongols and the surrounding area became a marsh. Konya-Urgench was soon built on or near the site of Jorjania. 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. Most if not all the ancient Iranic Khwarazmian people were killed or pushed out, paving the way for the Turkification of Khwarazm. Despite the devastating effects of the invasion, the city was revived and it regained its previous status. It was described by the 14th-century Berber traveller Ibn Battuta as "the largest, greatest, most beautiful and most important city of the Turks. It has fine bazaars and broad streets, a great number of buildings and abundance of commodities". In 1373, Timur attacked Khwarezm, and its ruler Yusef Sufi of the Sufi Dynasty surrendered to Timur. In 1379, Yusef Sufi rebelled against Timur, who sacked Urgench, and Yusef Sufi was killed. In 1388, the Sufi dynasty of Urgench again revolted against Timur; this time Timur razed Urgench to the ground and massacred its population, destroyed the city's irrigation system, and had barley planted over the ground where the city had once stood, leaving only one mosque standing. This, coupled with the sudden change of the Amu-Darya River's course, constituted the beginning of Kunya-Urgench's decline until the 16th century, when it was replaced as a regional capital by Khiva and was ultimately abandoned. 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. However, this use has now stopped, and efforts have been made to remove the decaying grave stones