In Northern Song time some border tribes grew very strong. They were the Khitan of the Kingdom of Liao and the Nuzhen of the Kingdom of Jin in Northeast China, and the Dang Xiang of the Kingdom of Western Xia. They fought among themselves and against the Song government. After conquering the Khitan, the Nuzhen swept south and overthrew the Northern Song Dynasty. In 1127 Zhao Gou, brother of the last emperor of the Northern Song Dynasty, established a new government in Nanjing (now Shangqiu, Henan Province), which is historically known as the Southern Song Dynasty.
In Northern Song time come border tribes grew very strong. One of them was the Khitan Tartars of the Kingdom of Liao. Its capital was Linhuang in Shangjing (south of present-day Bairin Left Banner in Inner Mongolia), and its founder was a man called Yelü Abaoji.
The Khitan Tartars were an old nationality from north China. They were first mentioned in historical records dating 389 in the Northern Wei period. They were located in the Xar Moron River valley and lived a nomadic life. Details of their origins are unknown, but by the early Tang Dynasty, the then existing eight Khitan Tartars tribes formed an ally, having an army of 40,000 and was then under the control of the Tang regime. The Tang government once established Prefecture and governors were appointed to administrate the area there. After the decline of the Tang, the Khitan Tartars frequently attacked its neighbors, captured people from other states and rapidly increased in power. In 916, Yelü Abaoji, the chief of the Khitan Tartars, declared himself emperor and named his state Khitan. Two years later, Yelü Abaoji, who was known as Emperor Taizu (the first emperor) of the Liao, set up his capital north of the Xar Moron River and named it Huangdu (imperial capital; later called Shangjing). Soon after, he conquered the Uygur in Ganzhou and captured the Bohai. In 947, Emperor Taizong of the Liao defeated the Later Jin and changed the name of his dynasty to the "Great Liao". In 983, the Liao Emperor, Yelu Longshu, revived the name Khitan, in 1066, restored the name the "Great Liao".
The Liao Dynasty had nine emperors and ruled for 210 years. Its territory reached the coast of the Northern Sea, the Eastern Sea, the Yellow Sea and the Bohai Sea in the east, the Jinshan (now the A'ertai Mountain) and Liusha (now the Bailongdui Desert in Xinjiang) in the west, the Kelulun, the E'erkun and the Selun'ge Rivers in the north, the southern side of the Outer Xing'anling Mountains in the northeast, the northern part of morden Shanxi, Baigou river in Hebei Province and the northern part of Gansu in the south.
In Liao, there were different ethnic groups, such as the Han people, the Khidan people. In politics, the Liao adopted a differential ruling system. That is, different systems were applied to people from different cultures and economies in different areas. The important ones were the tribal system, the slavery system, the Bohai system, and the feudal system which was for the Han people. Officials were divided into two groups according to where they came from (the north or the south). Corresponding administration systems were set up for each area. The Khitan administrative system, called the orthodox system, was applied to Khitan officials who were called northern officials, while the Han administrative system was applied to the Han officials, who were called southern officials. Because of different customs and levels of economic development, the northern officials mainly governed the Khitan Tartars and other nomadic peoples while the southern officials took charge of agriculture mainly in areas where the Han people resided.
The Liao rulers also adopted a differential economic management system, similar to its political one. This system promoted the economic development throughout the whole northern area. The Liao economy was divided into three zones: the fishing-hunting zone, the nomadic zone and the agricultural zone. The fishing-hunting zone covered the Khitan Tartars' area between the Xar Moron and Tuhe rivers, and the Nüzhen people's area in the northeast. The nomadic zone consisted of various northern grassland nationalities. The agricultural zone referred to the southern area where the Han lived and the eastern area where the Bohai lived.
The Liao achieved mainly in astronomy, the calendar, medicine and architecture. Not only did the Liao calendar keep the best parts of the Central Plain Han calendar, but also retain some of the special traits of the Khitan people. Important achievements were made in acupuncture, pulse-feeling diagnosis, gynecology, obstetrics and preservation of corpses. The Book of Acupuncture and Pulse-Feeling, written by a celebrated doctor named Zhi Lugu, enjoyed wide popularity at the time. The Liao architecture influenced by the Tang style and accommodating the Khitan customs, achieved its own unique style. The Khitan dialect and the Han language were the main languages used by the Liao.
In 1125, Emperor Tianzha was captured by the Jin army, which brought the Liao Dynasty to an end. In 1131, Yelü Dashi, a minister of the former Liao, reestablished the Liao in the Chuhe valley which became known as the Western Liao.