Sixteen Prefectures
In 907, the Khitan chieftain Abaoji succeeded in getting himself appointed khaghan of all Khitan tribes in the north, laying the foundations to what would officially become the Liao dynasty. In 936, the Khitan supported the Shanxi rebel Shi Jingtang in his revolt against the Shatuo Turkic Later Tang, which had destroyed the usurpers of the Tang in 923. The Khitan leader, Abaoji's second son Yelü Deguang, convinced Shi to found a new dynasty (the Later Jin, 936946), and received the crucial border region known as the Sixteen Prefectures in return. With the Sixteen Prefectures, the Khitan now possessed all the passes and fortifications that controlled access to the plains of northern China, including the main Great Wall line.