Jin–Song Wars  The Jin–Song Wars were a series of conflicts between the Jurchen Jin dynasty (1115–1234) and Han Chinese Song dynasty (960–1279). In 1115, Jurchen tribes rebelled against their overlords, the Khitan Liao dynasty (907–1125), and declared the formation of the Jin. Allying with the Song against their common enemy the Liao dynasty, the Jin promised to return to the Song the Sixteen Prefectures that had fallen under Liao control since 938. The Chinese agreed but the Jurchens' quick defeat of the Liao dynasty combined with Song dynasty military failures made the Jin reluctant to cede these territories. After a series of negotiations that embittered both sides, the Jurchens attacked the Song dynasty in 1125, dispatching one army to Taiyuan and the other to Bianjing (modern Kaifeng), the Song capital. Surprised by news of an invasion, Song general Tong Guan retreated from Taiyuan, which was besieged and later captured. As the second Jin army approached the capital, Song emperor Huizong abdicated and fled south. Qinzong, his eldest son, was enthroned. The Jurchens laid siege to Kaifeng in 1126, but Qinzong negotiated their retreat from the capital by agreeing to a large annual indemnity. Qinzong reneged on the deal and ordered Song forces to defend the prefectures instead of fortifying the capital. The Jin resumed war and again besieged Kaifeng in 1127. They captured Emperor Qinzong of Song, many members of the imperial family and high officials of the Song imperial court in an event known as the Jingkang Incident. This separated north and south China between Jin and Song. Remnants of the Song imperial family retreated to southern China and, after brief stays in several temporary capitals, eventually relocated to Lin'an (modern Hangzhou). The retreat divided the dynasty into two distinct periods, Northern Song and Southern Song. The Jurchens tried to conquer southern China in the 1130s but were bogged down by a pro-Song insurgency in the north and a counteroffensive by Song generals Yue Fei, Han Shizhong, and others. The Song generals regained some territories but retreated on the orders of Southern Song emperor Gaozong, who supported a peaceful resolution to the war. The Treaty of Shaoxing (1142) set the boundary of the two empires along the Huai River, but conflicts between the two dynasties continued until the fall of Jin in 1234.