Contacts between the Turks and Moslems commenced at the beginning of the 8th century and some of the Turks began to favour Islam. However the pro-Arab policies of the Omayads (661-750 A.D) restricted these relations somewhat. Later, many Moslem Turks took office in the Abbside government and because of this, great interest in the Islamic world spread among the Turks beyond the River Ceyhun. Commercial caravans also played a major role in the spread of Islam into the steppes of Central Asia. The Turks became fully Moslem by the 10th century, and this resulted in the achievement to political unity. Following these developments, the first Moslem Turkish state was formed by the Karahans.
The Karahans
The Karahans ruled between 990-1212 in Turkistan and Maveraünnehir. The reign of the Karahans is especially significant from the point of view of Turkish culture and art history. It is during this period that mosques, schools, bridges and caravansarays were constructed in the cities. Buhara and Samarkand became centres of learning. In the period, the Turkish language found the means to develop. Among the most important works of the period is Kutadgu Bilik (translated as "The Knowledge That Gives Happiness") written by Yusuf Has Hacib, between the years 1069-1070.
The Ghaznavids
The Ghaznavi state was formed in the year 963 by the Turkish ruler Sevuktekin and is one of the first Moslem Turkish states and worked relentlessly for the expansion of Islam in India. The Ghaznavids finally collapsed in 1186 and were assimilated by the Oguz.
The Turkish scholar Ebu Reyhan el-Beyruni makes this period an important one within Islamic cultural history and wrote the famed work by the poet Firdevsi, the Şehname, was also written in this period (A.D. 1009)
The Seljuks
The Oğuz, who destroyed the Ghaznavid state, succeeded in bringing Anatolia, Iraq, the southern part of the Caucasus, Azerbaijan and the north of Iran under Turkish rule. The Oğuz had first formed the Gökütrk Empire in the 6th century; after the expansion of Islam among the Turks, but among the Turks the Oguz came to be called the Turkmens.
Tuğrul Bey and Çağrı (Çakır) Bey were the grandsons of Seljuks whose name the Seljuks Dynasty adopted. In their time they, and the Oğuz, known as the Seljuks in history, subdued Horasan, defeated the Ghaznavid ruler Mesud in Dandanakan Battle and established the Great Seljuk empire in 1040.
In 1071, Alp Arslan (1063-1072) fought the battle of Malazgirt and having defeated the Byzantine Emperor's forces in this battle opened the doors of Anatolia to the Moslem Turk.
The year 1071 is considered to be the beginning of the Turks and that of Islam Anatolia. It is following this date that the Turks fully conquered the whole of Anatolia and established the Anatolian Seljuk state there as a part of the great Seljuk Empire.
The first schooling institutions, the Moslem theological medreses, were formed in Anatolia during the time of Kılıç Arslan (1153-1192), one in Konya and the other in Aksaray. Following the establishment of these two medreses the medreses of Syrcaly in Konya (1242-1243), Karatay (1251), İnce Minareli (1251-1253), Atabekkiye (after 1251-1268), Gökmedrese in Sivas (1271), Buruciye (1271-1272), Çifte Minareli (1271), and the Cacoglu in Kirsehir (1272) were established.
The Seljuks also attributed much importance to the medical sciences and in almost all their cities medical institutions called Darush-Shifa, Darul-Afiye and Darus-Sihna and hospitals were set up. The main medical treatment centres are the Gevher Nesibe in Kayseri (1205), the Izzettin I Keykavus in Sivas (1217), the Torumtay in Amasya (1266), the Muinuddin Pervane in Tokat (1275) and the Pervaneoglu Ali in Kastamonu (1272).
Because of the Persian influence coming from Iran among the intellectuals, the administrators, the men of arts and the traders, the Anatolian Seljuk state became increasingly affected by Iranian culture and language.