the liaodong region was settled since prehistoric times by neolithic people such as xinle culture. it later came under the rule of the gojoseon kingdom, which encompassed the northern korean peninsula and the region southeast of the liao river. in the late 4th century bc, the expanding chinese state of yan invaded and conquered this region from gojoseon, and established the liaodong commandery. after the fall of the yan state, the region was taken over by the short-lived qin dynasty, and then its prominent successor han dynasty. after the han dynasty fragmented at the turn of the 3rd century, the region changed hands between various warlord states such as the gongsun yuan, the nomadic wuhuan, and cao wei, before eventually falling under the reunified western jin dynasty. however, after the western jin fell from the uprising of the five barbarians and during the subsequent chaotic sixteen kingdoms periods, the region was ruled by former yan, former qin, later yan and later goguryeo, before reconquored by the tang dynasty. in 698 ad, the wu zhou defeat at battle of tianmenling allowed the newly found balhae to rule the region for the next two centuries, before taken over by the khitan liao dynasty, and followed by the jin dynasty, yuan dynasty, ming dynasty and qing dynasty.