The Jin–Song Wars were a series of conflicts between the Jurchen-led Jin dynasty (1115–1234) and the Han-led Song dynasty (960–1279). In 1115, Jurchen tribes rebelled against their overlords, the Khitan-led Liao dynasty (916–1125), and declared the formation of the Jin. Allying with the Song against their common enemy the Liao dynasty, the Jin promised to cede to the Song the Sixteen Prefectures that had fallen under Liao control since 938. The Song agreed but the Jin's quick defeat of the Liao combined with Song military failures made the Jin reluctant to cede territory. After a series of negotiations that embittered both sides, the Jurchens attacked the Song 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 Jin dynasty 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 Qinzong, 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, including Yue Fei and Han Shizhong.