 When Abaoji conquered the Balhae state in 926, most of the population was relocated to what is now Liaoning, China. At least three groups remained in the former Balhae territory, one of which formed the state of Ding 'an. Despite launching two invasions, in 975 and 985, the Liao forces were unable to defeat the Ding'an. Unable to eliminate the threat, and weary of Jurchen groups also inhabiting the region, the Liao established three forts with military colonies in the Yalu River valley area.
