The End of the Northern Song
In 1115, the Jurchens, a farm based group of people from eastern Manchuria rebelled against the Khitans' and declared the Jin Dynasty. The Song administration believed that they would gain a formitable ally with the Jin and made an alliance that included dividing up former Khitan land. This was a complete failure and the alliance deteriorated into open warfare between the Jin and Song in less than 3 years.
In 1126 the Juchens attacked the Song capital of Kaifeng in a siege that lasted less then 2 months and then sacked the city. The Emperor Huizong had abdicated and left the throne to his son. Both of them, as well as much of the imperial family was kidnapped following the siege and taken to places northeast for where attempts to pay ransom were unsuccessful and Huizong died in captivity. Meanwhile the remaining parts of the Song had regrouped and fled to southern China where they declared another son of Huizong as emperor.
The Song administration was now left with the undesirable position of being forced into peace talks with the Juchens. By 1138 however, the Song controlled all of China south of the Huai River and the Juchens controlling all of northern China.
Throughout the remaing years of the Song Dynasty, before its fall to the Mongols in 1276, many government officals and intellectuals dreamed of retaking their lost homeland, the place where all previous emperors were buried and home of all previous Chinese capitals. Indeed most historians agree that the Song officals who were part of the peace parties were nothing more than appeasers. A prime example of this is the general Yue Fei who made substantial gains in the north before being sacked and executed. However, the Song would have to remain somewhat of a tributary state to the Juchens following a 1142 treaty where they appeased them with annual payments.
Ebrey, Patricia Buckley. Cabridge Illustrated History: China.