Emperor Tianzuo of Liao (5 June 1075 – 1128 or 1156), personal name Yelü Yanxi, courtesy name Yanning, was the ninth and last emperor of the Khitan-led Liao dynasty of China. He succeeded his grandfather, Emperor Daozong, in 1101 and reigned until the fall of the Liao dynasty in 1125. Jin invasion During the reign of Emperor Tianzuo, the Jurchen tribes led by Wanyan Aguda established the Jin dynasty in 1115. Aguda formed the Alliance Conducted at Sea with the Han-led Northern Song dynasty against the Liao dynasty, and began to establish authority over former Liao territory in Outer Mongolia. Emperor Tianzuo, however, proved incompetent in dealing with the Jin threat, and in 1115 a coup was attempted by Liao generals to install his uncle Yelü Chun to the throne but was thwarted. Jin troops advanced from Manchuria in 1117, and captured the Liao supreme capital in 1120, then its central capital in 1122. Another coup was attempted in 1121 to install Emperor Tianzuo's son, the Prince of Jin, on the throne, but was again thwarted. The prince was executed, and most of the coup participants defected to the Jin dynasty. In 1122, Emperor Tianzuo fled from Nanjing (present-day Beijing) to the western regions. His uncle Yelü Chun then founded the short-lived Northern Liao dynasty in Nanjing, but died soon afterwards, and Nanjing was conquered by the Jin dynasty at the end of 1122 or in early 1123. End of the Liao dynasty After the end of the Northern Liao dynasty, the general Yelü Dashi rejoined Emperor Tianzuo. In 1123, Jin troops captured Emperor Tianzuo's palace at Qingzhong (south of present-day Hohhot), capturing members of his family. Emperor Tianzuo fled to the Western Xia and sought refuge there. Later, Emperor Tianzuo expressed his intention to attack the Jin dynasty, but Yelü Dashi withheld his support, considering it folly as the Jin dynasty was too militarily powerful. In 1124, Yelü Dashi fled to the west with a band of his followers, and established the Western Liao dynasty. In 1125, Emperor Tianzuo was captured by the Jin dynasty, thereby marking the collapse of the Liao dynasty. Death In 1156, in an act of humiliation, the Jin emperor who at the time was the Prince of Hailing ordered him and the former Emperor Qinzong of Song to compete in a match of polo. Emperor Qinzong was weak and frail, and thus quickly fell