天宝战争以后,唐朝兵败退出云南,出现了长达500年的南诏、大理的自治独立局面。
After the army of the Tang Dynasty was defeated in the Tianbo War and withdrew from Yunnan , the Nanzhao-Dali Kingdom ( a local regime ) had its autonomy for500 years .