Capital of the Liao and Jin Dynasties
By the early 10th century, the Tang Dynasty was on the verge of collapse, and the strong feudal city of Ji was left vulnerable. Grasping their chance, the Khitan around the Liaohe River in the northeast moved south and garrisoned in Ji, making it their second capital. It hence became known as Nanjing (Southern Capital) and Yanjing. During his reign, Emperor Taizong of the Liao Dynasty ordered the building of several palaces, using his new city as a stronghold for conquering the heartlands further to the south.
The Liao was subsequently conquered in the early 12th century by the Nuzhen who founded the Jin Dynasty. In 1153, the Jin transferred their capital to Yanjing, renaming it Zhongdu (Central Capital) in an attempt to succeed in their war against the Southern Song Dynasty that was later forced to move south.
In 1151, sorely needed renovation and rebuilding began, as the city of Zhongdu expanded in all directions. Palaces sprang up in the style of the Northern Song (the power ruling most of China 960-1127) capital on the Yellow River. The city of Zhongdu was laid out around a core of imperial buildings and its population was estimated at around one million.