Chapter Twenty-One: The Khitan (Part I)
During the era of the Turkic shogunate, the initial dread of the East faded as familiarity grew, for soon, a far greater stimulus arrived.
The Seljuk Empire unified a vast expanse from Transoxiana to the Mediterranean. They captured the Byzantine Emperor, breached Asia Minor—a region long elusive to Islamic states—and established the Sultanate of Rum.
In the East, after the Liao Dynasty was extinguished by the Jin, Yelü Dashi led the remnants of his forces to the Western Regions, where he founded Western Liao. This brought him into conflict with the regional hegemon, the Seljuk Empire. Sultan Sanjar, the restorer of Seljuk power, resolved to lead a personal campaign to eradicate these infidels from the East.
Sanjar was no fool. On the contrary, he was a man of youthful promise, a warrior his entire life, and a renowned hero of his time. At eleven, having lost his father, he served as governor of Khorasan, suppressing rebellions across the land. Later, he plunged into the routine civil wars of the Turkic dynasties, defeating a host of relatives by the age of nineteen to seize the sultanate and become the suzerain of all Turkic powers.
When he faced Western Liao, Sanjar was fifty-seven, yet he remained active on the battlefield. He was clearly no stranger to military affairs; having engaged dynasties from the Karakhanids of the Central Asian steppes to those in Syria and Asia Minor, he had forged a fragmented Islamic world back together through sheer force. His military and political experience was immense.
His adversary, the man who would later become world-renowned from the Khitan lands to Ireland, was two years his junior. Yet, in terms of military record, Yelü Dashi was vastly inferior.
By the standards of the Northern Song, Yelü Dashi was, in fact, a civil official. Though he bore the imperial surname Yelü, his kinship to the throne was too distant to matter; he had earned his position through the imperial examinations.
The Liao civil service exams were conducted exclusively in Chinese, testing traditional Chinese literary subjects. While the policy was later opened to all ethnic groups, non-Han candidates had to compete directly against the Chinese, who possessed both greater numbers and deeper cultural roots. Success was rare. Yelü Dashi was one of the only two Khitan scholars in history to pass the jinshi examination, a true academic prodigy.
After passing, he entered the Hanlin Academy. In the Khitan language, a Hanlin scholar was known as a "Linya." Thus, in Song historical records, he is referred to as "Dashi Linya"—Dashi the Hanlin. His only advantage was that the Liao system differed from the Song; having adopted more of the Tang structure, the separation between civil and military roles was less rigid, granting Yelü Dashi opportunities to participate in military affairs.
Yet, before arriving in the Western Regions, Yelü Dashi’s military record was lackluster. His moment of glory came while repelling a Northern Song offensive. In the final years of the Liao, collapse was imminent. In the Yanyun region, control became severely unstable; many local Chinese sought refuge under the Northern Song, and numerous officials defected.
The Northern Song, sensing an opportunity to recover the territory, mobilized a massive army of 150,000, led by the eunuch Tong Guan and the general Zhong Shidao. With the Liao government disintegrated and Emperor Tianzuo in hiding, officials in Yanjing elevated Yelü Chun to the throne, establishing the "Northern Liao." This small, beleaguered regime scraped together only 20,000 men to face the Song.
The Song army soon discovered the enemy's rear was exposed. They selected 6,000 elites to bypass the front and raid Yanjing. General Liu Yanshi followed with a reserve of 100,000. Finding the city’s defenses lax, the Song troops slipped inside; local Chinese residents rose in support, and soon all seven gates were under Song control—all while the city remained largely unaware of the breach.
Once successful, however, the Song troops failed to press their advantage, turning instead to drinking, rape, and the pillaging of the citizenry. The locals, suddenly attacked, resisted fiercely, bogging the Song down in street fighting. This gave the Northern Liao court a reprieve to urgently recall troops from the front.
As Song reinforcements failed to arrive, 3,000 Liao soldiers raced back. The elite Song troops inside the city, still entangled with the populace, were caught off guard. When the Liao relief force suddenly struck, the Song army suffered a crushing defeat; the 6,000 elites were all but annihilated, with only 400 escaping.
Hearing of the vanguard’s defeat, the main Song force was seized by panic. A few days later, at dusk, a wildfire broke out near the camp, and the Song army disintegrated. Commander Liu Yanshi burned the camp and fled. The main force trampled one another in their flight, with corpses littering the road for over a hundred miles and countless soldiers falling to their deaths in mountain ravines. The vast stores of armaments and supplies accumulated since the reigns of emperors Shenzong and Yuanfeng were almost entirely lost.
The Liao forces, unaware of what had occurred, only realized the Song army had collapsed at dawn. Only then did Yelü Dashi begin the pursuit. The Liao forces cursed the Song for breaking their alliance and chased them to their rear base at the ancient city, causing the remaining Song troops to scatter.
This was Yelü Dashi’s greatest achievement. While the result was massive, his personal role was negligible—perhaps less significant than the wildfire that dusk. Moreover, defeating the Song was hardly a feat worthy of boasting; it did not reflect the true caliber of a commander.
Against the Jin, a formidable enemy, Yelü Dashi was utterly hapless. He served as a local official on several occasions, but never for long, as every city he defended was captured by the Jin. Throughout his entire military career, he remained winless against the Jin Dynasty. Such a record is indeed difficult to justify.
Of course, Sanjar likely knew nothing of these details. Yet, this would not have altered the mindset of a veteran commander. Though he sent a provocative letter to Yelü Dashi before the battle, it was likely a ruse to goad his enemy. In reality, Sanjar did not underestimate the threat; despite his public scorn, he took the appearance of these new enemies very seriously.
To prepare, Sanjar leveraged the prestige of the Sultanate and the call of jihad to gather forces from Khorasan, Sistan, Ghazni, Mazandaran, Ghor, and other regions. Much of the Islamic world was mobilized; according to Persian historians, over 100,000 soldiers arrived. Sanjar spent six months merely assembling and reviewing this army.
In 1141—the same year the Song and Jin signed a peace treaty and the Southern Song recalled Yue Fei with twelve imperial tallies—Yelü Dashi led the Western Liao army westward to meet the Seljuk host on the Qatwan Steppe, north of Samarkand.