 Before they could invade the Song , the Jurchens reached a peace agreement with their western neighbors the <unk> Western Xia in 1124 . The following year near the <unk> Desert , they captured <unk> , the last emperor of the Liao , putting an end to the Liao dynasty for good . Ready to end their alliance with the Song , the Jurchens began preparations for an invasion . 
