Tang–Nanzhao conflicts in Annan was a period of intense chaos and warfare in Annan (present-day northern Vietnam) between local rebel forces, Nanzhao, and the Tang dynasty that lasted from 854 to 866. It ended in the defeat of Nanzhao and the retaking of Annan by the Tang general, Gao Pian, although the region would later become semi-independent from the Tang dynasty in 880.