Consolidation in the south was completed in 978, with the conquest of Wu-Yue. Song military forces then turned north against the Northern Han, which fell to Song forces in 979. However, efforts to take the Sixteen Prefectures were unsuccessful and they were incorporated into the Liao state based in Manchuria to the immediate north instead. To the far northwest, the Tanguts had been in power over northern Shaanxi since 881, after the earlier Tang court appointed a Tangut chief as a military governor ("jiedushi") over the region, a seat that became hereditary (forming the Xi-Xia dynasty). Although the Song state was evenly matched against the Liao dynasty, the Song gained significant military victories against the Western Xia (who would eventually fall to the Mongol conquest of Genghis Khan in 1227).