There were about 400 years of unrest in China after the end of Han dynasty and before the Tang dynasty established itself.
The Han Dynasty basically collapsed because of bad rulers, influence of empresses and court eunuchs over child emperors too young to rule by themselves and the Yellow Turban Revolt.
These collapse led to an unrest that lasted for more than 400 years before the establishment of the Tang dynasty.
Read more about Tang dynasty
brainly.com/question/297047