The Seljuks were, after the Ottomans, the most important Turkish dynasty in history. Their civilisation lives on in the monuments which they have left behind. Coming from central Asia they defeated the Ghaznevid dynasty, also, incidentally, of Turkish origin, at the battle of Dandanakan in 1040. They then advanced towards Anatolia, which fell to them when the Seljuk Sultan Alpaslan won the battle of Malazgirt in 1071. This was followed by large scale Turkish migrations, numerous Turkish tribes settling in different parts of Anatolia. Thus, from the end of the 11th century the Seljuks shared a frontier with the Byzantines, who on several occasions assembled multinational armies in vain attempts to dislodge them from Anatolia.
The golden age of the Seljuks in Anatolia coincided with the reign of Sultan Alaettln Keykubat in the 13th century. Science and culture flourished and every effort was made to make Anatolia into a trade centre by attracting to it the land traffic from Asia as far as China. Caravanserais were built and the Turks developed the first known form of insurance. Universities and hospitals worthy of the name were first established at that time. In 1243 the Anatolian Seljuks were defeated by the Mongols in the battle of Kosedag. The Seljuks never recovered from this blow and they were submerged by the Ottoman Turks.