of Sultan Sanjar or Sinjar of the same house, in the middle of the 11th century, Merv was overrun by the Turkish tribes of the Ghuzz from beyond the Oxus. It eventually passed under the sway of the rulers of Khwarizm (Khiva). After mixing with the settled peoples in Turkmenistan, the Oguz living north of the Kopet-Dag Mountains gradually became known as the Turkmen. The Seljuk empire broke down in the second half of the 12th century, and the Turkmen became independent tribal federation. Mongols and Timurids In 1157, the rule of Seljuks dynasty came to an end in the province of Khorasan. The Turkic rulers of Khiva took control of the area of Turkmenistan, under the title of Khwarezmshahs in 1221, central Asia suffered a disastrous invasion by Mongol warriors who swept across the region from their base in eastern Asia. 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. Small, semi-independent states arose under the rule of the region's tribal chiefs later in the 14th century. In the 1370s, Amir Timur (also known as Tamerlane), one of the greatest conquerors in human history, captured Turkmen states once more and established the short lived Timurid Empire, which collapsed after Timur's death in 1405, when Turkmens became independent once again. New political arrangements As a whole, the 14th to 16th centuries was a period in which the Turkmen's dislocation due to the Mongol invasions gave way to new political groupings which became tribal groupings which have continued to modern day. In addition to the new political arrangements, historical sources suggest that a large tribal union called the Salor confederation remained from the original Oghuz tribes and into modern times. In the late 17th century, the confederation fell apart and three senior tribes moved eastward and then southward. Of these tribes,