In the 7th and 8th century, an Islamic empire was established on the territory of what is now the Middle East, North Africa, the Spanish Peninsula and Afghanistan.
But by the end of the 9th century, this empire began to crumble. In particular, the ongoing conflict between Sunnis and Shiites shook the empire, and the emergence of regional identities led to division.
Thus, in the eastern part of Iran, the former peoples of the Tajiks created the samaiden dynasty, which had established a kingdom in present-day Uzbekistan, Afghanistan and Pakistan.
During the founding of the empire, many nomadic Turks were still migrating from the steppes of Central Asia to the Samaid Empire. These were converted by the Samaiden to Islam and used as slave soldiers, so-called Ghulam. Since the Turks were already trained as a nomadic people excellently in riding, as well as in the use of composite bow and sword, they quickly became irreplaceable for the Samaiden and enlarged the sphere of power of the ruling family.
As early as the 10th century, however, the rulers faced the rising Ghaznawid dynasty, which emerged from the ghulam and seized the power of eastern Iran, parts of Uzbekistan and most of Pakistan. The ruling caliphs also came under pressure in the west of the empire. Although a deposition by the Ghulams could be prevented there under the help of the Bujiden, these put a short time later, however, even the caliph and ruled over the western area and were put under pressure by new warlords.
Ultimately, the Bujiden could not hold and were conquered by the Ghaznawids. Especially under Mahmud of Ghazni, the territory of the Ghaznawids expanded rapidly and eventually reached from West Iran to Pakistan. Through regular raids to India, a steady stream of prey could be fed to the Reich, which reflected in the architecture, art and culture.
For a long time, the Ghaznavids themselves could not hold their own and were eventually overthrown by new streams of nomadic Turks from Central Asia who called themselves Seljuk Turks.
Decisive for the rise of the Seljuk Turks was the devastating battle on 23 May 1040 between the army of Masud I, son of Mahmuds of Ghazni, and the grandchildren of the Seljuk Turks Toghril Beg and Chagri Beg at Dandanqan in today's eastern Turkmenistan. Although the army of Masud I was superior to that of the Seljuk Turks 2 to 1, it was completely dry, hungry and demoralized until the battle was cut off. Before it even came to the right battle, the army of Masud I broke up and fled. The trailing Seljuks pursued the fleeing soldiers and destroyed them completely.
By destroying the Ghaznawi army, the Seljuks were no longer in the way to advance his conquest to the west. Thus Baghdad was conquered in 1055 and the strict principles of Sunni Islam were enforced in the occupied territories, leading to the punishment of all unbelievers. Accordingly, Toghril Beg's nephew Arp Arslan, after the death of his uncle in 1063, turned his attention to further conquests westwards to Christian Byzantium and Shiite Egypt.
In 1064 Armenia was conquered. In 1068 Arp Arslan invaded the Byzantine Empire and occupied large parts of Anatolia. Subsequently, Syria and campaigns against Palestine fell, and Egypt and Arabia were led with the aim of freeing the two sanctuaries of Islam Mecca and Medina from Shiite rule and incorporate it into their own empire.
The expansion of the Seljuk Empire under Arp Arslan was no longer hidden from Christian Europe. When in 1071 the Byzantine army at Mantzikert, today's Malazgirt in Turkey, were devastated and 1073 conquered Jerusalem, Pope Urban II was forced to defend Christianity against Islam and called in 1095 in Clermont for the first crusade what made the Middle East the scene of the conflict of religions.