After the death of Sultan Malikshah I (1027-1092), efforts to disobey central authorities of Seljuq empire had been increased and the state started falling into decay. During the rule of Sultan Sanjar (1118-1157), the empire was disintegrated into separate sovereign states governed by rulers titled Atabegs. One of such states was the Atabegs of Azerbaijan, commonly known as the State of Eldiguzids.
Territories of Azerbaijan were a part of Iraqi Seljuq Sultanate which had separated from the Great Seljuq Empire in 1118. Restoration of sovereignty and strengthening of Azerbaijan is associated with the name of Atabeg Shams ad-Din Eldiguz (1136-1175) – statesman who was formerly an indentured servant in the court of Iraqi Seljuqs, and later attained to the post of an influential governor. Sultan Toghrul II had appointed Shamseddin to the position of atabeg – governor of his son Arslan, and transferred Nakhchivan and its surrounding territories to his possession as iqta. In 1136, Sultan Masud expanded the iqta’s geographic area to cover an entire province of Arran. After that Eldiguz had chosen Barda as his residence. As stated by chroniclers, in 1136 Atabeg Shams ad-Din “defeated all and conquered many of the great rulers, got rid of the rebels and put an end to a chaos in the state of Arran (Azerbaijan territories to the north of Araz)”. As a result of cited political processes, state of Azerbaijan Atabegs emerged under the reign of Eldiguzids dynasty.
Eldiguzids managed to unite an entire territory of Azerbaijan under their rule. The state had its own money. Its capital was first based in Nakhchivan. At the same time, Shams ad-Din Eldiguz didn’t lose his influence in the court of Iraqi Seljuqs, and actively participated in the sultanate’s politics.
State of Eldeguzids united broad lands “from the gates of Tiflis till Makran”, which covered territories of Azerbaijan, Iraq, Hamadan, Mazandaran, Isfahan and Ray. Additionally, Eldiguzids imposed vassalage upon the rulers of İlat (Ahlat), Fars, Mosul and other areas.
In 1139, disastrous earthquake occurred in the vicinities of Ganja, causing a lot of destructions and death of the majority of city population. Shortly afterwards, Ganja was invaded by Georgian army which made massacres and captured the city’s famous gates.
In 1161, Georgian and Kipchak troops which were led by the Georgian king George III, had conquered the city of Ani and killed most of its’ Muslim population. Shortly afterwards the same fate was shared by a Muslim community of Dvin (Dabil). In 1163, Shams ad-Din Eldiguz launched a military counter-campaign. Mobilized from Nakhchivan, his troops regained Dvin and invaded Georgia, killing 10 thousand Georgian soldiers in a battle occurred between two armies. In 1164, Georgians suffered serious beatdown and had to withdraw their troops from Ani. In 1174-1175, Shams ad-Din launched a new campaign, which resulted in the enemy’s comprehensive defeat and stampeding of the Georgian king from a battlefield. It deserves mentioning that in both campaigns Eldiguzids had been tough on Georgian combatants, but at the same time they never offended Christian communities of the conquered territories.
In 1175, the throne was ascended by Muhammad Jahan Pahlavan – son of Shams ad-Din Eldiguz, who came from Hamadan and ruled the state until 1186. After the death of Great Seljuq sultan Arslan Shah, Muhammad boosted Toghrul III to the power of Iraqi Seljuq Sultanate, and accepted a title of “Great Atabeg”. Having assigned his brother Qizil Arslan to the position of ruler of Arran, Muhammad moved the state’s capital to Tabriz and issued a decree obliging Mosul, Hilat, Fars, Khuzestan and other provinces to make khutbahs in the sake of Toghrul III and to mint money on his behalf. During his rule, Muhammad Jahan Pahlavan managed to strengthen the sultanate’s central authorities. Among others he calmed down disobedient governors (especially emir of Ajam-Iraqi), dismissed incapable warlords and officials. Muhammad appointed 70 personal mamluks (servants) to key public positions and provided them with iqtas. By keeping power over Azerbaijan and Iraqi Seljuq Sultanate in his hand, Muhammad weakened the authority of Abbasid caliphate and prevented it from interfering with the sultanate’s domestic affairs.
After the death of Muhammad Jahan Pahlavan, struggle for the power began between his children, his brother Qizil Arslan and sultan Toghrul III. Having won his competitors, Qizil Arslan became the first ruler in the dynasty to accept a title of sultan. In order to eliminate feuds and assert his power over Iraqi Seljuq Sultanate and Azerbaijan Atabegs, Arslan married the widow of Muhammad Jahan Pahlavan and concluded truce with his nephews. In 1190, he defeated the great sultan’s army of in Hamadan battle, and neutered Toghrul III by immuring him in the Nakhchivan castle. Within the short period of time, Qizil Arslan asserted his power over the provinces of Azerbaijan, Arran, Hamadan, Isfahan, Rey, Fars and Khuzestan.
In 1191, Qizil Arslan was assassinated by coup plotters and superseded by Abu Bakr (1191-1210). Under the rule of Abu Bakr, the state became weakened by feuds, and then fell into decay during the last atabeg Uzbek (1210-1225). In 1220-1222, the state was further weakened by Mongol invasions, and in 1225 it was conquered by Jalaladdin – prince and warlord of Khwarazmian dynasty.