▁Song , ▁Southern ▁Q i ▁and ▁Northern ▁Z hou ▁maintain ▁their ▁rules ▁around ▁the ▁command ery ▁in ▁the ▁Kun ming ▁area . ▁South west ▁Y unn an ▁and ▁the ▁eastern ▁rug ged , ▁mountain ous ▁areas ▁were ▁still ▁enjo ying ▁relative ▁independence , ▁ruled ▁by ▁trib al ▁k ings ▁and ▁ch ie ft ains ▁with ▁little ▁Chinese ▁influence . ▁ ▁N anz ha o ▁Kingdom ▁▁ ▁In ▁ 6 4 9 ▁AD ▁the ▁ch ie ft ain ▁of ▁the ▁Y i ▁M eng she ▁tribe , ▁X in ulu o ▁( ), ▁founded ▁a ▁kingdom ▁() ▁in ▁the ▁area ▁of ▁Lake ▁Er hai . ▁In ▁the ▁year ▁AD ▁ 7 3 7 , ▁Pil u oge ▁() ▁un ited ▁the ▁six ▁z ha os ▁in ▁succession , ▁establish ing ▁a ▁new ▁kingdom ▁called ▁N anz ha o . ▁ ▁In ▁ 7 5 0 , ▁N anz ha o ▁inv aded ▁the ▁Tang ▁dynast y . ▁In ▁ret ali ation , ▁the ▁Tang ▁sent ▁an ▁army ▁against ▁N anz ha o ▁in ▁ 7 5 1 , ▁but ▁this ▁army ▁was ▁sound ly ▁defeated ▁at ▁X i agu an . ▁ ▁In ▁ 7 5 4 , ▁another ▁army ▁was ▁sent , ▁this ▁time ▁from ▁the ▁north , ▁but ▁it ▁too ▁was ▁defeated . ▁Bol ster ed ▁by ▁these ▁success es , ▁N anz ha o ▁expanded ▁rapidly , ▁first ▁into ▁Bur ma , ▁then ▁into ▁the ▁rest ▁of ▁Y unn an , ▁down ▁into ▁northern ▁La os ▁and ▁Th ailand , ▁and