During the reign of Ibrahim ibn Nasser, Karakhanids were divided into two independent Khanates — Eastern and Western. Ibrahim Tamgach Bogra-Khan moved the capital of the Western Khanate from Uzgend to Samarkand and annexed Fergana. The western Khanate with the center in Bukhara comprised the territories of Mawerannahr up to Khujand, and the eastern Khanate comprised Taraz Isfijab, Shash, Ferghana, Seven Rivers and Kashgar, with the capital in Balasagun.
In 1042, the leader of the Eastern Kanagat, Arslan Khan Suleiman (Sharaf al-Dawla), divided the land among the members of his dynasty, leaving himself Kashgar and Balasagun . This was the beginning of the legal acknowledgement of the actual break-up of the state into independent and semi-independent domains. However, the struggle for power did not stop there: in 1056, Yagan-Tegin Muhammad Bogra-Khan defeated his brother, Arslan Khan, and took his possessions, but then he was poisoned. Afterwards, the head of state was proclaimed the son of Bogra-Khan, Ibrahim, who died soon in the war with the Barskhan ruler, Yinal-Tegin.
Afterwards, in the eastern Kaganate, for 15 years, from 1059 to 1074, the leaders of the Khanate were the sons of Kadyr Khan, Yusuf Togrul Khan and Bograkhan Harun. The border between these two Kaganates was along the Syr-Darya River .
When the son of Togrul-Khan, Togrul-Tegin, ascended to the throne, two months later, he was replaced by the uncle of Togrul-Tegin, Bogra-Khan Harun (1074–1102), who possessed the land of Balasagun, Kashgan and Khotan.
During his leadership in 1089, the state of Karakhanids was hit by the Seljuk Sultan, Malik Shah (1072–1092), who invaded Samarkand. After the army reached Uzgend, Bogra Khan surrendered, acknowledging himself a vassal of Malik Shah. Thus, Kharakhanid state fell under the supreme power of Seljukids, but they continued to appoint only agreeable khans from among the members of the Kharakhanid dynasty.
At the same time, Kashgar was besieged by Togrul (possibly, he was the son of Tegin). Bogra-Khan Harun was taken prisoner, but was soon released thanks to the intercession of Yakub, the ruler of Atbashi. Malik Shah concluded an agreement with Yakub and left Uzgend.
In 1102, after the death of Bogra-Khan, the ruler of Taraz and Balasagun, Kadyr-Khan Jabrail rebelled against Seljuks. Capturing all the land up to the Amu Darya, he tried to conquer the Seljuk Termez, but he was defeated, captivated and executed .
During the reign of Sultan Sanjar (1118–1157), Seljukids had maximum influence in Mawerannahr. During this period, there was a political decline of Karakhanids.
By the resolution of the Seljuk Sultan, Sanjar, the great-grandson of Ibrahim Tamgach-KhanArslan-Khan (1102–1130) was appointed governor of Mawerannahr, who tried to pursue an independent policy. He appointed his son, Nasser, to be a co-governer, but the Muslim clergy tops conspired and Nasser was killed. Then, Arslan-Khan called for the help of Sultan Sanjar, who raided with his army to Maweranahr, besieged Samarkand in 1130, and took it. Arslan Khan, who suffered from a serious illness, died shortly after in Balkh.
In the first half of the 12th century, the state of Karakhanids descended from the historical scene. This happened because of the attack by Karakitays (Khitans), who conquered the Seven Rivers Regions with Balasagun and all the domains of the eastern Karakhanids, after which they began to claim the western domains of the state.
After the defeat of the Karakhanid-Seljuk troops in 1141, the power over the state of the two khanates of Karakhanids went to Karakitays. In 1210, after Karakitays defeated Naimans, the eastern Karakhanid dynasty ceased to exist. In 2012, the Khorezm Shah Muhammad killed the last western Kagan, Osman from Samarkand.
1. Ibn al-Asir. Al-kamilfi-t-tarikh, IX, p. 356.
2. V. V. Bartold. History Essays of the Seven River Region. // Essays, v. II, p. I. M., 1963, p. 44.
3. Ibn al-Asir. Al-kamilfi-t-tarikh, Volume X, p. 239–240.