Nomadic tribes constantly threaten China's borders.
The eleventh century-Jurchen tribes of northern Manchuria had descended from the Tungusic Mohe, or Malgal tribes who had been subjects of the ethnically Goguryeo/Balhae state during the Tang era.
By the eleventh century, the nomadic Jurchens, who inhabit the region of present Manchuria, had become vassals of the Khitan Liao Dynasty to the south.
This changes in 1114-1115, when the Jurchen chieftain Wanyan Aguda, having unified his people, abruptly severs relations with his Liao overlord, declares himself Emperor, and leads his tribesmen in a sweeping conquest of southern Manchuria, quickly seizing Shangjing, also known as Huanglongfu, the Northern Capital of Liao.
As the Jurzhen attack from the north, the Han Chinese of the Song imperium attack the Khitans, their longtime enemies, from the south.
Huizong’s misguided alliance against the Khitan Liao with the Jurzhen and their subsequent treachery will result in the Song court’s total loss of North China.