The Seljuk dynasty was established in 985 by a Turk tribe outside Iran in the north. The founder of this dynasty was Seljuk who first settled in south central Kazakhstan.under rule of Togrul beg they started immigrating to Khorasan and since then the reign of the Seljuks started in Iran.
The Seljuks entered Khorasan province and some lands and cities including Merv, Neishabur, Balkh and finally, they captured Ghazni, the capital of the Ghaznavid dynasty in 1037.the Ghaznavids were defeated in the battle of Dandanaqan and left the territories to the Seljuks.
This period was a flourishing time for Persian literature, art, and science. Nezam Al-Molk, the great Iranian scientist was the vizier of Malek Shah and the kings very well supported the poets and scientists. Omar Khayyam (the astronomer) and Ghazali (the philosopher) were two other famous people of this era.
They founded many schools the most important of which was Nezamiyeh University in Baghdad. The culmination of Seljuk dynasty was during the reign of Malek Shah. When he died in 1092, the empire started to decline because of the quarrels and oppositions for the throne. So it led to the split of the territory and the dynasty did not last longer than 1153 when different groups and tribes attacked from different regions and ended this great empire.