李世民的八世祖李暠,在西晋末据敦煌、酒泉为王,建西凉国,自称凉公,也就是凉武昭王,据说李暠是西汉名将李广的儿子李敢之后。李广曾祖李仲翔,为汉初将军,曾讨伐叛羌,在素昌阵亡,素昌即唐代的狄道。李仲翔的儿子李伯考葬父于狄道东川,从此定居该地,后来成为西州右姓大族,所谓陇西李氏。至李暠的儿子李歆时,西凉为匈奴贵族沮渠蒙逊所建的北凉所灭。(The eighth ancestor of Li Shimin is called Li Hao, he occupied Dunhuang, Jiuquan and other regions to be king in the end of the Tsin Dynasty, and established the Kingdom of Great Liang. Li Hao called himself Emperor Liang, namely Emperor Liang Wuzhao. It is said that Li Hao is the descendant of Li Gan, the son of Li Guang who is a famous general in the Western Han Dynasty.
Li Guang's great grandfather was Li Zhongxiang, who was the general of the early Han Dynasty. He ever crusaded against the rebellious tribe called Qiang and died in Suchang, also called Didao in the Tang Dynasty.
Li Zhongxiang's son, Li Bokao, buried his father in Dongchuan of Didao and settled from then on. Later his family became a bid family which is the so-called Li's family in Longxi.
When Li Xin became the emperor of the Kingdom of Great Liang, the Kingdom is destroyed by the Kingdom of Northern Liang established by Juqu Mengxun, who belongs to Hun noble
)