Under their commander, Genghis Khan, founder of the Mongol Empire, the Mongols conquered Khwarezm and burned the city of Merv to the ground. The Mongol leader ordered the massacre of Merv's inhabitants as well as the destruction of the province's farms and irrigation works which effectively ended the Iranian dominance in urban areas and agricultural communities of khwarezm. These areas were soon repopulated by the Turkmen who survived the invasion and had retreated northward to the plains of Kazakhstan or westward to the shores of the Caspian Sea. After the division of the Mongol Empire, present Turkmenistan was passed to Chagatai Khanate except southernmost part was belonged to Ilkhanate.