In 907, Yelü Abaoji held a feast at the salt lake and killed the leaders of seven tribes, ending the Khitan Eight Tribes' tradition of choosing a leader every three years. He later established Shangjing Linhuang Prefecture, proclaimed himself emperor in 916, and named his state the Great Khitan. He launched an eastern campaign against the Balhae kingdom and appointed his second son, Yelü Deguang, Grand Marshal of All Armies, sowing the seeds of conflict between the brothers.
When Abaoji died in 926, Empress Dowager Shulü helped Deguang take the throne, while Yelü Bei defected to Later Tang. Deguang acquired the Sixteen Prefectures of Yanyun and renamed the state the Great Liao in 947. But his tolerance of “raiding for supplies” provoked resistance, and he died on the retreat north. In just forty years, the Khitan transformed from a tribal confederation into a dynasty. Their system of separate Southern and Northern administrations, along with the cession of the Sixteen Prefectures of Yanyun, left a lasting impact.