Sultan Muhammad Tapar (1105 - 1118)

Muhammad was generally welcomed as a unifying and stabilising influence when he was recognised as sultan in 1105, in a world devastated by constant warfare during the sultanate of Berk-Yaruq. A source praises him as "the perfect man of the Seljuq dynasty". His brother Sanjar stayed loyal in Khorasan, but consolidated his power and influence there and in Transoxiana. Muhammad followed a policy of divide and rule interspersed with occasional acts of brutality to keep some control over the growing power of would-be independent amirs. The two major problems from Berk-Yaruq's reign were still there, however:

The Franj (Crusaders)

Contemporary Islamic sources barely mention the fall of Antioch in 1098, or the sack of Jerusalem in 1099 by the European invaders. Even a direct appeal to the caliph in Baghdad by a deputation of survivors of the massacre elicited only a promise (unfulfilled) of an official enquiry. Muhammad did order the amir of Mosul to fight the Franj, but little was achieved - with Tutush's sons, rulers of Aleppo and Damascus, actually intervening in support of the Crusaders. Muhammad made no personal effort to support jihad. The establishment of a few European principalities on the Mediterranean seaboard were not seen as a threat to Islam from the Seljuq point of view (though they may have been seen as such in Damascus or Cairo).

Conquest of Jerusalem 1099

"Taking of Jerusalem by the Crusaders" by Emil Signol 1847.

The Nizari Ismailis

The Nizaris - Shi'i Ismailis opposed to the Sunnism of the Seljuqs and rejecting the Abbasid caliphate entirely - were seen as a far more serious threat to Islam than the Franj. Although their strongholds were isolated from each other, they spread terror through their policy of assassinations, and in fact were supported by some Seljuq factions - including the Seljuqs of Kirman, and Tutush's descendants in Syria. Their strength had grown during the civil wars of Berk-Yaruq's reign, but once Muhammad became supreme, he fought energetically against the "heretics" until his death in 1118. Thus Alamut, their stronghold, which he had been about to take, was unexpectedly reprieved. Later moves against the Ismailis were half-hearted: they became useful bogeymen to be blamed whenever a political assassination was needed. As they seemed no longer a threat to the Seljuqs' main interests, they were allowed to continue in their mountain retreats. In fact Alamut lasted until captured by the Mongols in 1256.

Mahmud and Masu'd (1118 - 1152)

Muhammad's death fighting the Ismailis meant Sanjar became the senior Seljuq ruler - with Muhammad's 14-year-old son Mahmud recognised as the sultan in Baghdad. Power thus shifted from Iraq to Khorasan - as Mahmud and his three brothers (who were all recognised as sultan somewhere at some stage) were increasingly unable to control the local amirs, who played off the various contenders against each other. This also kept them short of money. Mahmud (1118 - 1131) managed to keep tabs only on Iraq and Jibal (roughly modern Iran west of the great salt desert).

At the beginning of Mahmud's reign Sanjar tried to recreate a single Seljuq empire as it had been in the days of Alp Arslan. This he failed to do - despite scraping a military victory against Mahmud (only thanks to his 18 elephants), and had to return to his Khorasan base, though he kept Rayy for its strategic and symbolic importance as the original Seljuq capital. But Sanjar was now the Great Sultan, and Mahmud had to acknowledge his supremacy. But on Mahmud's death (aged 27 in 1131) chaos erupted yet again. First Muhammad's son Toghrul II seemed the most likely to succeed his brother- he was backed by Sanjar. Ambitious viziers, amirs and atabegs - and even the Abbasid caliphs, who were trying at this time to resurrect their political power - complicated the already volatile situation. But eventually it was Masu'd (1132 - 1152) who overcame his brother Toghrul II and his nephew, Mahmud's son Da'ud. He was never, though, able to overcome the various powerful amirs (some of whom had by now established their own dynasties) - and the competing viziers. But he did somehow remain sultan for nearly 20 years.

Sanjar, "King of the East"

The province of Khwarazm (south of the Aral Sea) had since 1041 been a vassal-state of the Seljuqs, ruled by a Khwarazm shah appointed by them. Its culture and language were originally Iranian - and it only gradually succumbed to Turkish influences from the surrounding steppes. For most of the 12th and 13th centuries it was a brilliant and prosperous centre of intellectual and artistic life. In 1127 Atsız became Khwarazm shah. Though he was at first a loyal ally of Sanjar, by 1138 Sanjar began to fear his ambitions, and deposed him. But Atsız was popular, and came back immediately. After Sanjar's defeat in 1141 at Qatwan, he invaded Khorasan, ultimately unsuccessfully. Sanjar counter-attacked and Atsız was made to accept his subordinate status. But he had laid the foundations of a powerful empire. Khwarazm's day would come.

The Qarakhitay were more of a problem. They were probably originally Mongols, but long integrated into Chinese culture. They were an offshoot of the Liao dynasty (or Khitans) which had dominated Manchuria and north-eastern China since the 4th century AD. Since the Arab defeat of the Chinese at Talas in 751 there had been little direct contact between the Chinese and Islamic worlds - although the Sogdians had learned to make paper, and Chinese porcelain was becoming known in the west. In 1125 their dynasty was overthrown by a Manchu people from Siberia. A section, the Qara Khitay - or Black Khitay - migrated westwards, eventually into the territory of the Qarakhanids, for some time vassals of Sanjar, in Transoxiana. Unlike the Mongols who were soon to follow them, they seemed to pose no serious military threat, although they did halt the eastward spread of Islam. Surprisingly, though, it was against them that Sanjar experienced the first defeat of his career, at the Battle of Qatwan (near Samarkand) in 1141. The result was the loss of Transoxiana for the Seljuqs, and loss of reputation for Sanjar.

Ghurid madrasa

Ruins of a Ghurid Madrasa (1165 AD) at Shah-i Mashhad in Afghanistan.

Further east, there was a confrontation with the Ghurids - named from their centre at Ghur in Afghanistan. The mountainous and inaccessible region (until quite recently a partly pagan partly Buddhist island in the Islamic ocean, and an Iranian(Tajik) enclave surrounded by Turks) had been from time to time under Ghaznavid control, but Sanjar had conquered it in 1117. But around 1135, the long-reigning Seljuq vassals were ousted by a local chief, whose family founded the dynasty known as the Ghurids. They proved troublesome to both Seljuqs and Ghaznavids. Sanjar curbed their power for a time, but by 1186 they had overwhelmed the Ghaznavid empire in India, which they held until taken over by the resurgent Khwarazm empire.

In 1153, Sanjar suffered his second ever defeat. This, almost unbelievably, was at the hands of his own unruly Türkmen, the intractable tribes of still nomadic Oghuz. Enraged by the increasing rapacity of Sanjar's tax-collectors (his wars had been expensive), they rebelled. They defeated Sanjar in battle twice, and overran Khorasan, so prosperous and stable for so long, doing untold damage to its infrastructure and resources. Corpses were piled high in the streets, people were dragged out of mosques, and the great library at Nishapur was burned. They imprisoned the humiliated Sanjar and his queen for over three years. He did eventually escape, but died soon afterwards, at Merv in 1157. The wreckage of Khorasan was fought over for the next half-century. Eventually it was absorbed into the Khwarazmian empire.

Sanjar's death signalled the end of the Great Seljuq empire: the sultans in the west had by now lost all power and control of their lands - and their dynasty was to be finally snuffed out in 1194. Sanjar is seen in Muslim sources as the greatest of the Seljuqs, a combination of the Khusraus and the Kayanians according to one. And his reign - the longest of any Seljuq (over 60 years) - brought security and prosperity to Khorasan, while great poets such as Mo'ezzi and Anwari flourished at his court in Nishapur.

Sanjar tomb at Merv

The Mausoleum of Sanjar in Merv.